Re: lockfiles & fork()
- From
- Florian Weimer <fw@deneb.enyo.de>
- Date
- Oct 28, 2006, 13:30 UTC
- Message-ID
- <87fyd8ftzg.fsf@mid.deneb.enyo.de>
- In-Reply-To
- <Pine.LNX.4.63.0610280319250.26682@wbgn013.biozentrum.uni-wuerzburg.de>
* Johannes Schindelin:
Show 5 quoted lines
> when you setup a lockfile, and then fork(), you could easily end up with > atexit() kicking in to remove the lockfile, before the main process has a > chance to commit. (Yes, I need to hold the lock long before the fork()). > > Any ideas how to solve the problem?
I think you should call _exit in the child instead of exit.