libraries are not re-entrant; particularly, memory allocation and I/O
routines are not. That meant that doing nearly I<anything> in your
handler could in theory trigger a memory fault and subsequent core
-dump - see L<Deferred Signals> below.
+dump - see L</Deferred Signals (Safe Signals)> below.
The names of the signals are the ones listed out by C<kill -l> on your
system, or you can retrieve them from the Config module. Set up an
Note that the default in Perl 5.7.3 and later is to automatically use
the C<:perlio> layer.
+Note that some networking library functions like gethostbyname() are
+known to have their own implementations of timeouts which may conflict
+with your timeouts. If you are having problems with such functions,
+you can try using the POSIX sigaction() function, which bypasses the
+Perl safe signals (note that this means subjecting yourself to
+possible memory corruption, as described above). Instead of setting
+C<$SIG{ALRM}> try something like the following:
+
+ use POSIX;
+ sigaction SIGALRM, new POSIX::SigAction sub { die "alarm\n" }
+ or die "Error setting SIGALRM handler: $!\n";
+
=item Signals as "faults"
Certain signals e.g. SEGV, ILL, BUS are generated as a result of
If you want the old signal behaviour back regardless of possible
memory corruption, set the environment variable C<PERL_SIGNALS> to
-C<"unsafe">.
+C<"unsafe"> (a new feature since Perl 5.8.1).
=head1 Using open() for IPC