> -----Original Message----- > From: owner-openssl-us...@openssl.org > [mailto:owner-openssl-us...@openssl.org] On Behalf Of David Schwartz > Sent: 22 July 2009 00:03 > To: openssl-users@openssl.org > Subject: RE: setting FD_CLOEXEC on BIO sockets > > You should not issue a 'close' unless you want to close the socket > descriptor. If you want to shutdown the network connection, > you should call > 'shutdown'. If you call 'close', you lose the chance to call > 'shutdown'.
Thanks, I'll look into doing that as well. Haven't done much in the line of working with sockets, so didn't realise the difference between the 2 calls. > Your problem is just as much that the daemon is not shutting down its > network connections as it is that the subprocesses are > holding references to > them. Fixing either inner problem will fix your outer problem. Working on both. > Although, if the daemon crashes, it will have no opportunity > to shutdown its > connections. So, still seems like a good idea to avoid unnecessary file descriptors being left open and inherited. > It is not, IMO, a generally good idea to rely on 'close' to implicitly > shutdown a network connection. This capability is largely > only provided for > naive applications to automatically DTRT even if they don't > know they're > talking to a network connection. If you want to shutdown a network > connection, you should do so explicitly. > > DS You've probably already realised at this point that I didn't write the original code :-), it is however interesting learning from it. -- Regards, Darragh Bailey Systems Software Engineer Hewlett Packard Galway Ltd. Postal Address: Hewlett Packard Galway Limited, Ballybrit Business Park, Galway Registered Office: Hewlett Packard Galway Limited, 63-74 Sir John Rogerson's Quay Dublin 2 Registered Number: 361933 ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org