Peter Eisentraut <[EMAIL PROTECTED]> writes:
> Am Dienstag, 11. Dezember 2007 schrieb Tom Lane:
>> Doesn't this patch break the behavior that is documented in the comment?
>> Specifically, the case where the restore_command dies on a signal and
>> this is reported to us by the controlling shell as exitcode > 128.
>> We want the archiver to die, but this patch makes it not do so.

> AFAICT, the coding

> WIFSIGNALED(rc) || WEXITSTATUS(rc) > 128

> is simply redundant, because a signal happened exactly when WIFSIGNALED(rc) 
> is 
> true.

No, you are confusing the cases "called shell was killed by a signal"
and "called command was killed by a signal, which the shell then turned
around and reported to us as exit > 128".

> I have tested this:

A single test case proves little.  You need to consider race conditions
and cases where the shell is ignoring the particular signal.  I'm fairly
certain that both of these exit statuses can happen in practice, at
least with some shells/platforms.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to