On 11/28/17 12:17 AM, Thiruvadi Rajaraman wrote: > Hi, > > Thanks a lot for your review comments. > > I have reworked on the bash sleep fix based on your suggestion about signal > and trap handling in fsleep( ). > > I have attached the fix patch for your kind reference.
Your patch unconditionally changes the SIGCHLD signal handler to an invalid value (you probably meant to use SIG_IGN) without restoring it. An interactive shell would not be able to use job control until something internal reset the SIGCHLD handler to the correct value. An approach that uses pselect() if available and blocks SIGCHLD for the duration of the call, as Angel suggested, is probably the best approach. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/