Untitled
public text v1 · immutable#include <unistd.h>
#include <iostream>
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)
}
}