Attachment missing.On Sat, Oct 24, 2020 at 7:21 PM senan jude <senan_b...@nitc.ac.in> wrote:SirIn the assignment 2 of stage 22 the parent program (attached below) is supposed to print the pid of the 8 resulting process of 3 consecutive fork system calls. But as I run the code half of the pid values were 0. When I checked the code the return value of fork system call is printed by each process. But this value is not the pid. In the last fork call the existing 4 process are made in to 8 and those former 4 process have pid of child as return value, and the new 4 process has the value 0. So should I change the provided code? Thanking you in advance.SincerelySenan JudeB180706CSCSE B
In the assignment 2 of stage 22 the parent program (attached below) is supposed to print the pid of the 8 resulting process of 3 consecutive fork system calls. But as I run the code half of the pid values were 0. When I checked the code the return value of fork system call is printed by each process. But this value is not the pid. In the last fork call the existing 4 process are made in to 8 and those former 4 process have pid of child as return value, and the new 4 process has the value 0. So should I change the provided code? Thanking you in advance.
--
You received this message because you are subscribed to the Google Groups "XOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xos-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/xos-users/CAEp%2Bu%2ByYrXM3faim9V%3DAwjHUJBAYp1kT%3DiTD-7a_aV_zcOnr_w%40mail.gmail.com.