--- libev/ev.pod 2008/03/16 16:42:56 1.137 +++ libev/ev.pod 2008/03/31 01:14:12 1.138 @@ -1087,6 +1087,18 @@ enable C, or resort to C or C. +=head3 The special problem of SIGPIPE + +While not really specific to libev, it is easy to forget about SIGPIPE: +when reading from a pipe whose other end has been closed, your program +gets send a SIGPIPE, which, by default, aborts your program. For most +programs this is sensible behaviour, for daemons, this is usually +undesirable. + +So when you encounter spurious, unexplained daemon exits, make sure you +ignore SIGPIPE (and maybe make sure you log the exit status of your daemon +somewhere, as that would have given you a big clue). + =head3 Watcher-Specific Functions