All pastes #985921 Raw Edit

Untitled

public text v1 · immutable
·published 2008-04-15 12:20 UTC
rendered paste body
#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)
	}
}