#include #include #include using namespace std; int main() { pid_t pid; switch(pid = fork()) { case -1: perror("Fork failed"); break; case 0: cout << "Child Exiting" << endl; return 0; } // parent from here on out cout << "RUN\ttop -p " << pid << endl; sleep(20); cout << "Done napping" << endl; return 0; }