in reply to Re: fork, %SIG, END.
in thread fork, %SIG, END.
etm1777:
it is my understanding that the program does not exit within the END block, but after the END block has completed; the scope returns to a global (file) one, where $? is then returned, like so:
it is my understanding that the program does not exit within the END block, but after the END block has completed; the scope returns to a global (file) one, where $? is then returned, like so:
END { local $?; # preserve previous return code # do anything } # now, outside of the END block, # $? refers to the global and the # program officially terminates # using this value.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: fork, %SIG, END.
by etm117 (Pilgrim) on Aug 19, 2005 at 21:06 UTC |
In Section
Seekers of Perl Wisdom