$ perl -E' $SIG{INT} = sub { if ($i++) { say "You were sure."; exit(1); } else { say "Are you sure?"; } }; for (;;) { say "Waiting..."; if (select(undef, undef, undef, undef) < 0) { if ($!{EINTR}) { say "Interrupted"; } else { die $!; } } else { say "select returned without an error???"; } } ' Waiting... ^CAre you sure? Interrupted Waiting... ^CYou were sure.
In reply to Re^5: waking from select, or IO::Pipe in same process?
by ikegami
in thread waking from select, or IO::Pipe in same process?
by checker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |