Changeset a49dcd5


Ignore:
Timestamp:
2006-01-22T20:33:56Z (19 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
1d2e3c2
Parents:
57c4fc0
Message:

Fixed the bug that caused a fork() bomb last night.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bitlbee.c

    r57c4fc0 ra49dcd5  
    104104                else if( i != 0 )
    105105                        exit( 0 );
    106                 close( 0 );
    107                 close( 1 );
    108                 close( 2 );
     106               
    109107                chdir( "/" );
     108               
     109                /* Sometimes std* are already closed (for example when we're in a RESTARTed
     110                   BitlBee process. So let's only close TTY-fds. */
     111                if( isatty( 0 ) ) close( 0 );
     112                if( isatty( 0 ) ) close( 1 );
     113                if( isatty( 0 ) ) close( 2 );
    110114        }
    111115#endif
Note: See TracChangeset for help on using the changeset viewer.