Thread View: comp.mail.sendmail
1 messages
1 total messages
Started by Eric Wassenaar
Sat, 19 Nov 1988 22:26
sendmail reports "Bad file number"
Author: Eric Wassenaar
Date: Sat, 19 Nov 1988 22:26
Date: Sat, 19 Nov 1988 22:26
17 lines
1244 bytes
1244 bytes
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@nikhefh.hep.nl Bitnet: nikhefh!e07@mcvax.bitnet
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads