sendmail reports "Bad file number"
Eric Wassenaar
e07 at nikhefh.hep.nl
Sun Nov 20 08:26:47 AEST 1988
Every now and then there is some discussion about the "Bad file number"
status that sendmail reports in case an smtp transaction fails.
So far I have not read a satisfactory answer. I think this is:
In the routine smtpquit() in usersmtp.c there is a double fclose(SmtpIn)
and fclose(SmtpOut) which both refer to the same fileno (the socket).
The first one actually closes the socket, so the second one fails and
clobbers errno. The remedy is to save the current errno before the
double fclose() and restore it afterwards.
Eric Wassenaar
--
Organization: NIKHEF-H, National Institute for Nuclear and High-Energy Physics
Address: Kruislaan 409, P.O. Box 41882, 1009 DB Amsterdam, the Netherlands
Phone: +31 20 5920412 Home phone: +31 20 909449 Telex: 10262 (hef nl)
Internet: e07 at nikhefh.hep.nl Bitnet: nikhefh!e07 at mcvax.bitnet
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list