Xref: utzoo comp.mail.sendmail:598 comp.unix.aux:729 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!lll-lcc!pyramid!nessus!pst From: pst@nessus.UUCP (Paul Traina) Newsgroups: comp.mail.sendmail,comp.unix.aux Subject: Re: sendmail 5.61 dumps core writing to SmtpOut (fix) Summary: fixed it... Keywords: sendmail, aux, macintosh, system5 Message-ID: <229@nessus.UUCP> Date: 4 Mar 89 05:37:26 GMT References: <228@nessus.UUCP> Followup-To: poster Distribution: usa Organization: Shockwave Engineering, Santa Barbara, California Lines: 30 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@hub.ucsb.edu ...pyramid!ucsbcsl!nessus!pst pst@ai.ai.mit.edu == What can you say about chocolate covered manhole covers?