fork ...etc close(STDOUT); ...etc setsid();