1

There is no bash indicator prompt after a forked process terminates

view story
linux-howto

http://unix.stackexchange.com – I am reading the book Advanced Programming in the Unix Environment. There is a test program to test the fork function. It works well in my Ubuntu. But what I confused is that why there is no command indicator prompt after the child process exits. The original program is like the below. #include <stdio.h> #include <unistd.h> #include <sys/wait.h> int main() { pid_t pid; if ((pid = fork()) < 0) { printf("fork error.\n"); return 1; } else if (pid == 0) { if ((pid = fork()) < 0) { printf("fork error.\n"); return 1; } else (HowTos)