On 16 October 2015 at 16:56, Paul Wouters <[email protected]> wrote: > > The debug printing can easilly be moved. > > The sleep was there to ensure the parent had continued, and when the > addconn fork is calling the parent on the socket in /var/run, there > is something listening. If that is actually needed, we could add it > as an option to addconn to pause for one second there.
My guess (incorrect) was that it was trying to keep log messages somewhat in sync. Ewww. Thanks for the background. Yea, technically, it should either use synchronization (pipes for instance); but, sigh, I guess a while loop with a sleep to make it really clear what it is waiting for would also work. 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(). Andrew _______________________________________________ Swan-dev mailing list [email protected] https://lists.libreswan.org/mailman/listinfo/swan-dev
