Process Management - fork - 1 pid_t fork(void); if ( (pid = fork()) < 0) perror("fork"); else if (pid == 0) /* child */ { printf("child: here\n"); } else /* pid > 0 */ /* parent */ { printf("parent: here\n"); }
if ( (pid = fork()) < 0) perror("fork"); else if (pid == 0) /* child */ { printf("child: here\n"); } else /* pid > 0 */ /* parent */ { printf("parent: here\n"); }