in reply to Re^3: waking from select, or IO::Pipe in same process?
in thread waking from select, or IO::Pipe in same process?

Ah, somehow I missed that in my reading about how to do this. If that's the case, I don't need the pipe at all, which is nice.

Thanks!
Chris

  • Comment on Re^4: waking from select, or IO::Pipe in same process?

Replies are listed 'Best First'.
Re^5: waking from select, or IO::Pipe in same process?
by ikegami (Patriarch) on Jul 15, 2011 at 19:03 UTC
    $ 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.