/* This is used if you want to cleanse the environment for the forked
child, it fixes up the important signals and nukes all of the fds,
otherwise acts like normal fork. */
/* This is used if you want to cleanse the environment for the forked
child, it fixes up the important signals and nukes all of the fds,
otherwise acts like normal fork. */
- fcntl(K,F_SETFD,FD_CLOEXEC);
+ if(K != dontCloseThisFd)
+ fcntl(K,F_SETFD,FD_CLOEXEC);