[sslh] sslh and openbsd

François FRITZ francois at artofsoft.com
Tue May 18 12:25:43 CEST 2010


Hi,

One of my coworker is trying to use sslh with openbsd.
He noticed that the child processes just stay in the zombie state. He 
submitted a patch to you yesterday and you didn't like it :-).
I've had a look and wrote a short program to test the behavior of 
sigaction and propagation of the mask and signal handling  on this system.
The SA_NOCLDWAIT flag is not propagated to the child process.
So, to avoid the zombie processes, just move up your initial fork just 
after the if(verbose) stuff:

   if (verbose)
       printsettings();

   if (fork() > 0) exit(0); /* Detach */

   setup_signals();

   listen_socket = start_listen_socket(&addr_listen);


You could also choose to move down the setup_signals call after this 
fork... It's up to you.

Here is the patch in the diff format:
462a463,464
 >    if (fork() > 0) exit(0); /* Detach */
 >
467,468d468
<    if (fork() > 0) exit(0); /* Detach */
<

Have a nice day.
FF.





More information about the sslh mailing list