nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] fpurge()


From: David Levine
Subject: Re: [Nmh-workers] fpurge()
Date: Thu, 03 Jan 2013 23:37:11 -0500

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]