summaryrefslogtreecommitdiff
path: root/perlvars.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2019-11-11 14:03:41 +0000
committerDavid Mitchell <davem@iabyn.com>2019-11-18 09:34:40 +0000
commitddb513d51f5efcde057dad7932a56643647947e1 (patch)
tree22422f506519f87ae5e441455b75f96aa5ff950f /perlvars.h
parent8a5e470b690b1c90c7332e613ada153af5547505 (diff)
downloadperl-ddb513d51f5efcde057dad7932a56643647947e1.tar.gz
fix unsafe signals under exceptions
The preceding commit flagged up an existing bug, but kept old the buggy behaviour. This commit fixes the bug. I haven't added a test, since it seems that the test suite doesn't try with unsafe signals. But this code: $SIG{USR1} = sub { $gotit++, die }; eval { kill SIGUSR1, $$ } for 1..2; print "gotit=$gotit\n"; when run before erroneously gave 1, but now correctly gives 2. Basically the code that restores the signal mask after a sig handler dies, should do it only in a direct (unsafe) signal handler: the deferred (safe) signal handler will have already done it. The bug was that the inbuilt perl unsafe signal handler was being incorrectly treated as safe. The code path via POSIX (and for which a test was added with v5.13.9-531-gc22d665b55) *was* ok.
Diffstat (limited to 'perlvars.h')
0 files changed, 0 insertions, 0 deletions