There doesn't appear to be any support for explicitly *ignoring* signals, at least not according to documentation or IO::Async::Signal/Loop source. This seems like it could be a useful feature to add:
$loop->ignore_signal('PIPE');
as distinct from:
$loop->watch_signal(PIPE => sub {});
i.e. ignore the signal completely, rather than just providing an empty handler.
Currently it seems the only way to do this would be a manual
$SIG{PIPE} = 'ignore';
As for SIGPIPE, ignoring that signal is the first thing I do in any code, can't really see a case where the default behaviour is useful, so I like the idea of ignore-by-default (or at least an empty handler that just records the event via ->debug_printf).
cheers,
Tom
On Fri Mar 28 18:06:00 2014, PEVANS wrote:
Show quoted text> It turns out that GTK (or Glib) ignores SIGPIPE anyway, so actually
> IO::Async::Loop::Glib->run has been ignoring SIGPIPE for all this time
> anyway.
>
> Probably the best thing to do is to have run do
>
> local $SIG{PIPE} = "ignore";
>
> across the various loop implementations, and special-case any other
> run-like cases that might not be within run (e.g. Future->await cases)