[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: client sockets and fork



Hi Randy,

>There are a couple of things I'd like to be able to do which I don't
>see how to do right now.  One is to fork() a process that has an open
>connection.  Sometimes you might want to pass the connection on to
>the child, or keep it in the parent.  In either case, it would be
>prudent to clean up the extra socket connection that gets spawned.

You can call ldap_ld_free(), which frees the LDAP session data without
sending an unbind. Unfortunately, this is private API, so we can't
guarantee that the end-user's client library will support it; if
we don't have ldap_ld_free(), we set LDAP_OPT_DESC to -1 and then
call ldap_unbind. See the nss_ldap code for an example (in the 
function do_close_no_unbind()).

regards,


-- Luke

--
Luke Howard
PADL Software Pty Ltd
http://www.padl.com