develooper Front page | perl.perl5.porters | Postings from August 2012

[perl #114586] Signals and exec() interaction

Thread Next
David Leadbeater
August 25, 2012 04:17
[perl #114586] Signals and exec() interaction
Message ID:
# New Ticket Created by  David Leadbeater 
# Please include the string:  [perl #114586]
# in the subject line of all future correspondence about this issue. 
# <URL: >

In despatch_signals in mg.c there's a comment explaining how perl
tries to emulate a behaviour of real signals in safe signals:

            /* From sigaction(2) (FreeBSD man page):
             * | Signal routines normally execute with the signal that
             * | caused their invocation blocked, but other signals may
             * | yet occur.
             * Emulation of this behavior (from within Perl) is enabled
             * using sigprocmask

However there's an issue in the emulation: if a signal handler
directly calls exec() the signal is never unblocked, because the
destructor/clean up function set up in Perl_despatch_signals isn't


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About