Copyover and SIGSEGV again

From: Erwin S. Andreasen (erwin@PIP.DKNET.DK)
Date: 05/01/98


On Fri, 1 May 1998, James Turner wrote:


>
> One problem I've found is that you need to be sure to close all
> descriptors you don't attach players to when you copyover.  The
> problem is, if you exec and someone is in the CON_PASSWORD state, they
> won't be written to the copyover file.  When the copyover happens,

You can use FD_CLOEXEC flag to make sure the descriptor gets clsoed when
you exec:

fcntl (fd, F_SETFD, FD_CLOEXEC);

I think. Then when you exec, this file descriptor is closed.

You can also clear it, by passing 0 as third argument.

I've never tried this myself, but I suppose I should, to make sure only
things I want to keep open are.


 =============================================================================
Erwin Andreasen   Herlev, Denmark <erwin@pip.dknet.dk>  UNIX System Programmer
<URL:http://www.abandoned.org/drylock/>     <*>         (not speaking for) DDE
 =============================================================================


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST