#!/usr/bin/perl use strict; use warnings; use CGI; # Ein Handler fuer alle Signale $SIG{$_} = \&handle_sig for keys %SIG; my $c = new CGI; open (STDERR, '>', '/tmp/sleep.log') or die $!; print STDERR scalar(localtime), ": started sleep.cgi\n"; # Header etc. schicken print $c->header('endless sleep'), $c->start_html(); # Dann Endlosschleife $|++; while (1) { sleep 1; print "."; } # Wird nie erreicht print $c->end_html; exit 0; #################################### sub handle_sig { my ($sig) = @_; print STDERR scalar(localtime), ": SIG$sig!"; exit -1; }