Because few vendors provide
C libraries that are safely re-entrant, the prudent
programmer will do little else within a handler beyond setting a numeric
variable that already exists; or, if locked into a slow (restarting) system
call, using die()
to raise an exception and
longjmp(3)
out. In fact, even these may in some cases cause a
core dump. It's probably best to avoid signals except where they are
absolutely inevitable. This perilous problems will be addressed in a future
release of Perl.