Paul Wouters wrote the following: > On Sat, 17 Oct 2015, David McCullough wrote: > > >Just remember that with vfork and the code in question, the parent is > >blocked until after the exec, so the sleep does nothing but slow the whole > >process down by 1 second :-) > > Funny. Seems I introduced it in commit 1987ac98f where I claim: > > * sleep 1s in the addconn thread on startup > > It seems on my laptop, things start too fast and pluto isn't ready > yet to accept connections to load. > > Although I just removed it now and it seems fine. > > >Also, IIRC "exit" is not vfork safe, _exit() should be used instead. > > We do use _exit() although we passed it 42 :)
Well you still need an exit code, and 42 is a good one. > >>BTW, if there's code lurking that is turning a process into a daemon > >>(fork/fork/exec) is one technique; then that should be changed to just > >>call daemon(). > > The code I talked about was written in python, see > contrib/updown-example/example-terminate.py Cheers, Davidm -- David McCullough, [email protected], Ph: 0410 560 763 _______________________________________________ Swan-dev mailing list [email protected] https://lists.libreswan.org/mailman/listinfo/swan-dev
