Of course you can't always set up quite as minimalistic signal handlers, but don't use them for any more work than absolutely necessary.#!/usr/bin/perl -w use strict; my $got_int = 0; $SIG{INT} = sub { $got_int++ }; while (1){ print "Signal caught", exit if $got_int; print "I am here\n"; }
Makeshifts last the longest.
In reply to Re^2: signal handler on NT
by Aristotle
in thread signal handler on NT
by xhe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |