On 3/25/13 6:45 PM, Pádraig Brady wrote: > OK thanks for the pointer. > So the race is narrowed rather than closed? > As we have: > > execute_disk_command() > { > int pid = fork(); > if (pid == 0) /* child */ > { > CHECK_SIGTERM; /* Honor received SIGTERM. */ > do stuff; > CHECK_SIGTERM; /* Honor received SIGTERM. */ > /* --->SIGTERM still ignored if received here?<--- */ > exec(...); > }
Please don't omit the code immediately following the fork that restores the signal handlers. The execute_disk_command() code actually looks like this: pid = make_child (blah...); if (pid == 0) { reset_terminating_signals (); /* XXX */ /* Cancel traps, in trap.c. */ restore_original_signals (); CHECK_SIGTERM; ... exec (blah,...); There is code in make_child that resets the sigterm status (RESET_SIGTERM), since fork() is supposed to clear the set of pending signals anyway. Please see if you can reproduce it with the current devel branch code. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/