in reply to Re: Re: Re: Re: Signals and subprocesses using fork, and system or exec.
in thread Signals and subprocesses using fork, and system or exec.
The second fork lets you have two processes: one to run ssh, and the other to catch a HUP signal and do whatever it likes to the ssh server. The problem with your existing code is that when you run exec, the signal handler is cleared; using fork too lets you have one process with a signal handler of your choice, and a second process running ssh.
I'm not sure that this has an advantage over not doing the second fork and just keeping the PID's that ran exec in %PIDPOOL.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re: Signals and subprocesses using fork, and system or exec.
by exussum0 (Vicar) on Aug 27, 2003 at 16:02 UTC |