>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 _______________________________________________ Nmh-workers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/nmh-workers
