http://www.perlmonks.org?node_id=485235

eff_i_g has asked for the wisdom of the Perl Monks concerning the following question:

monks,

i am working with fork, %SIG, and the END block on version 5.8.6, and i have a few curiosities:

  1. when exit is used, is a SIG called (i tried INT and QUIT) or only the END block?
  2. what happens when you use exit inside of a terminating signal subroutine? it knows it is already exiting, so is exit ignored, or will it still use the return value specified, if any?
  3. when working with fork, can you "instruct" code within an END block to only execute for the parent and not the child?

thank you.

edit: sorry for the name botch on the reply etm, i just got back from lunch :P