#include
#include
#include
int main(void)
{
if (fork() > 0)
/* Forces parent to wait for child
* to force scheduling order */
wait(NULL);
printf(My PID is %d
, getpid());
printf(My parents PID is %d
, getppid());
return 0;
}
#include
#include
#include
int main(void)
{
if (fork() > 0)
/* Forces parent to wait for child
* to force scheduling order */
wait(NULL);
printf(My PID is %d
, getpid());
printf(My parents PID is %d
, getppid());
return 0;
}
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.