perl -e ' BEGIN { *CORE::GLOBAL::exit = sub { goto FASTCGI_NEXT_REQUEST; }; } while (1) { eval { that_cgi_script() }; FASTCGI_NEXT_REQUEST: last; } sub that_cgi_script { local $SIG{__DIE__} = sub { print "

error: $_[0]"; exit; print "XXX\n" }; print "before buggy code\n"; eval { buggy_code() }; print "after buggy code\n"; } sub buggy_code { die "error!"; print "after die\n"; } '