Skip Menu |

This queue is for tickets about the File-NFSLock CPAN distribution.

Report information
The Basics
Id: 61258
Status: resolved
Priority: 0/
Queue: File-NFSLock

People
Owner: bbb [...] cpan.org
Requestors: cpan [...] danonline.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.20
Fixed in: 1.23



Subject: Signal handler causes successful exit status
$graceful_sig, which File::NFSLock installs as a handler for SIGTERM and SIGINT, misleadingly exit()s with a successful status. perl's default signal handlers for SIGINT and SIGTERM, however, exit with a nonzero exit status. The simplest solution would simply be to die rather than exit, since die will also run destructors. A slightly more ideal solution would be to exit with the same status that perl would have otherwise used for the appropriate signal. I'll work on a patch for this, and submit it here.
On Fri Sep 10 18:55:27 2010, DAXELROD wrote: Show quoted text
> $graceful_sig, which File::NFSLock installs as a handler for SIGTERM and > SIGINT, misleadingly exit()s with a successful status. > > perl's default signal handlers for SIGINT and SIGTERM, however, exit > with a nonzero exit status. > > The simplest solution would simply be to die rather than exit, since die > will also run destructors. > > A slightly more ideal solution would be to exit with the same status > that perl would have otherwise used for the appropriate signal. > > I'll work on a patch for this, and submit it here.
I understand that exiting with successful status is an issue. But I don't think die is appropriate because it will not penetrate through an eval. I feel that such fatal signals need to try harder to ensure everything is cleaned up and the process completes ASAP. -- Rob
It's probably safe to just exit with a non-zero status, right? But still need to avoid using the "die" command.
Version 1.23 will exit with a non-zero status to more closely mimic the default fatal signal handlers. Thank you for your report.