SIGPIPE handling in nnrpd

Heath Kehoe hakehoe at avalon.net
Mon Jul 19 15:23:17 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The comment above the signal(SIGPIPE...) call says it's there
to get out of long write loops.

It appears that PushIOb doesn't check for error returns of
xwrite.  PushIOv does.  I'll also modify PushIOb to check
for an error return and do an exit, the way that PushIOv
does.  I'll look around for any other writes that aren't
checked for error, and fix those, so that there's no need
for the sigpipe handler.

- - heath

On Jul 19, 2004, at 9:51, Heath Kehoe wrote:
>
> Ok, so the nnrpd has a SIGPIPE handler which calls ExitWithStats.
> This is Bad.  Specially for ovdb.  So I propose that instead of
> setting a SIGPIPE handler, we set SIGPIPE to SIG_IGN.  This should
> cause a write to return EPIPE instead; which will be caught
> in-line and allowing a proper exit.
>
> Unless there are any objections, I'd like to put this change in
> both STABLE and CURRENT.
>
> - - heath
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFA++dq4uXPAG0A1J4RAuifAJsHqUwXizy6mJxWJzAiCIu1C1PJLACfYBfv
YY0KUo6HDAgdxJ6BFOaylR0=
=PwQU
-----END PGP SIGNATURE-----



More information about the inn-workers mailing list