GetLock - dpkg compatible lock file manipulation (fcntl)
This source is placed in the Public Domain, do with it what you will
GetLock - dpkg compatible lock file manipulation (fcntl)
This source is placed in the Public Domain, do with it what you will
/*}}}*/
// flNotFile - Strip the file from the directory name /*{{{*/
// ---------------------------------------------------------------------
/*}}}*/
// flNotFile - Strip the file from the directory name /*{{{*/
// ---------------------------------------------------------------------
/* 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);
/*}}}*/
// ExecWait - Fancy waitpid /*{{{*/
// ---------------------------------------------------------------------
/*}}}*/
// ExecWait - Fancy waitpid /*{{{*/
// ---------------------------------------------------------------------