On Thu, May 18, 2006 at 07:05:38PM +0400, Stefan Walter wrote:

> i am using a server who has some SSL connections opened...
> 
> in this server i fork to use a independent exec. directly after the
> exec in the child i call exit(0), but then the SSL connection which is
> an exact copy of the parent gets also deinitialized. in this case even
> my server crashes because the TCP port is not available then.

Generally code after exec() does not get to run, but if the program
to be executed does not exist or is not executable, you should indeed
call _exit() as already mentioned. Don't forget to mark the SSL sockets
"close on exec", so that the child process does not end up with unwanted
descriptors in its file table, it can't use them anyway (it does not
have the necessary data to encrypt/decrypt the data).

-- 
        Viktor.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to