Problem 1: Without Wait?
/* Wait/problematic.c */
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int main(int argc,char *argv[])
{
printf("Before fork...\n");
if(fork() == 0)
{
printf("Hello World!\n");
exit(0);
}
printf("After fork..\n");
return 0;
}Before fork...
Hello World!
After fork...Last updated