nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] fpurge()


From: Ken Hornstein
Subject: Re: [Nmh-workers] fpurge()
Date: Sat, 29 Dec 2012 00:59:57 -0500

>discard.c also has some non-portable code:
>And it's called on the streams that post uses to talk to its
>smtp server:
>
>    kill (sm_child, SIGKILL);
>    discard (sm_rfp);
>    discard (sm_wfp);
>
>The discard()'s after killing the child process seem unnecessary
>to me.

I am wondering ... maybe the point of discard() is to prevent a SIGPIPE?
If those streams try to write on the process after they've closed, that
is what will happen, right?  At the very least that would happen when
exit() is called.

I see fpurge() is not part of POSIX, so we can't rely on it.  So I'm not
sure what to do; maybe the correct solution is to block SIGPIPE
and close those filehandles?

--Ken



reply via email to

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