use POSIX (); $SIG{USR1} = sub { ... }; unless(fork) { sleep(4); kill(POSIX::SIGUSR1(), getppid()); exit; }