[Sshpass-devel] SIGCHLD blocking?
Brought to you by:
thesun
From: Martin G. <omg...@gm...> - 2018-07-05 02:29:39
|
Hi all, I'm looking at the sshpass code, and noticed the following: in runprogram, SIGCHLD is blocked for the parent process after the fork is done. Shouldn't the blocking be done before the fork, restoring the old sigmask for the child if needed? What would happen if the child finishes for some reason before the parent blocks the signal? If the answer is that pselect would still return successfully, then what's the point of blocking the signal in the first place? |