in reply to fork process + SIG handlers
SIG{'HUP'} = $SIG{'INT'} = $SIG{'KILL'} = $SIG{'TERM'} = &sig_handler;
This is wrong, it calls the subroutine sig_handler and assigns the result of that function call to the variables. You want either $SIG{FOO}='sig_handler'; or $SIG{FOO} = \&sig_handler;