#include #include int main() { int pid; if(pid = fork()) { std::cerr << "pid: " << pid << std::endl; sleep(100); } else { // child, do nothing and die (and become a zombie because our parent didn't wait for us) } }