sendmail 5.61 dumps core writing to SmtpOut (fix)
Paul Traina
pst at nessus.UUCP
Sat Mar 4 15:37:26 AEST 1989
Thanks to the people that responded, especially Steve Alexander @ Lachman.
There are two ways to fix it, I'll present Steve's, since it's more elgant
than mine. In the routine makeconnection() in daemon.c, the socket is
open & connected, then two fdopen's are made on the same socket.
System V has a bug in stdio, so this won't work right. The two solutions
are either (a) open it once for reads & writes, and then do rewinds
between reads & writes (ugly), or Steve's solution, just dup() the socket.
(I didn't think that would work, so I never tried it).
Old code:
*outfile = fdopen(s, "w");
*infile = fdopen(s, "r");
New code:
*outfile = fdopen(dup(s), "w");
*infile = fdopen(s, "r");
I've tried it out, and it seems to run like a champ (so far :-) ).
Hope this helps someone else. The rest of the 5.61 conversion is
trivial. If anyone wants diffs off the 5.61 distribution for System5
w/Berkeley networking (at least Unisoft's), drop me a note.
Paul
--
== pst%nessus at hub.ucsb.edu ...pyramid!ucsbcsl!nessus!pst pst at ai.ai.mit.edu ==
What can you say about chocolate covered manhole covers?
More information about the Comp.unix.aux
mailing list