nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] fpurge()

2013-01-03 22:37:33
Ken wrote:

When sm_end() is called with NOTOK as an argument, it means things are
messed up.  Seems like killing the child is reasonable to do here.  Given
that code segment, it would be easy to block SIGPIPE here (those two
filehandles are closed further down in sm_end()).

Done (on the m_getfld branch).

In mhl discard() is called in the SIGINT interrupt handler; I guess the
idea there is to prevent any more stuff from being written out.  Right
after that putchar('\n') is called, so clearly they're not worried about
SIGPIPE.  I think we could safely just remove that.

That being the newline?  I think we should leave it, in case
part of a line had been output.  If you mean the discard() call,
it seems reasonable to purge (tcflush) stdout there.

    discard (out = stdout); /* XXX: reference discard() to help loader */

So ... based on that comment, it almost seems like the usage of
discard() here is superfluous.  I really can't think of a reason why
it's needed.  Ok, we need out = stdout, but other than that I don't
know why it's needed.

I removed that discard().

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>