#include #include using namespace std; int main() { cout << "My pid is: " << getpid() << "\n===========\n"; int pid = fork(); cout << "fork() returned: " << pid << endl << "My pid is: " << getpid() << endl << "My parent's pid is: " << getppid() << endl << "=======================\n"; }