Xref: utzoo comp.sys.att:12145 comp.mail.sendmail:3040 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!boingo.med.jhu.edu!haven!mimsy!nocusuhs!nmrdc1!rdc30 From: rdc30@nmrdc1.nmrdc.nnmc.navy.mil (LCDR Michael E. Dobson) Newsgroups: comp.sys.att,comp.mail.sendmail Subject: Re: Sendmail-5.65+IDA-1.4.3 on AT&T 3B2 Message-ID: <1991Apr15.153119.2724@nmrdc1.nmrdc.nnmc.navy.mil> Date: 15 Apr 91 15:31:19 GMT References: <1991Apr12.204413.9515@nmrdc1.nmrdc.nnmc.navy.mil> <1991Apr13.071422.4412@comp.vuw.ac.nz> Organization: Naval Medical Research & Development Command Lines: 36 In article <1991Apr13.071422.4412@comp.vuw.ac.nz> mark@comp.vuw.ac.nz (Mark Davies) writes: > >In article <1991Apr12.204413.9515@nmrdc1.nmrdc.nnmc.navy.mil>, >rdc30@nmrdc1.nmrdc.nnmc.navy.mil (LCDR Michael E. Dobson) writes: [most of the desription of my problem deleted] >|> We suspect something is munging the values in the FILE structs *SmtpOut, >|> *SmtpIn, **outfile and **infile, but have been unable to track it down. > >I just came across the same problem building sendmail on an interactive box. >The fix is to dup() the socket descriptor "s" before doing the two >fdopens of outfile and infile. It seems that these systems don't like >the file descriptors being shared. > >Here's the patch (sorry its not a context diff, but its pretty simple). > > # diff daemon.c~ daemon.c > 499c499 > < *infile = fdopen(s, "r"); > --- > > *infile = fdopen(dup(s), "r"); > > BINGO!! I applied the patch and the mail gets through! Thanks^1000! What's even more interesting, this trick is used a little earlier in the code with the socket descriptor "t" . Guess I should have spent some more time studying the code :-) -- Mike Dobson, Sys Admin for | Internet: rdc30@nmrdc1.nmrdc.nnmc.navy.mil nmrdc1.nmrdc.nnmc.navy.mil | UUCP: ...uunet!mimsy!nmrdc1!rdc30 AT&T 3B2/600G Sys V R 3.2.2 | BITNET: dobson@usuhsb or nrd0mxd@vmnmdsc WIN/TCP for 3B2 | MCI-Mail: 377-2719 or 0003772719@mcimail.com