Ignore:
Timestamp:
30/05/06 17:22:44 (14 years ago)
Author:
spascoe
Message:

bbftpd.run() now returns to python in the calling process. This allows
the original process to monitor the daemon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/src/bbftp-server-3.2.0/bbftpd/bbftpd_daemon.c

    r773 r1065  
    8787extern int outcontrolsock ; 
    8888 
     89#ifdef NDG_PYTHON_EMBED 
     90int do_daemon(int argc, char **argv, char **envp) 
     91#else 
    8992void do_daemon(int argc,char **argv,char **envp) 
     93#endif 
    9094{ 
    9195 
     
    133137        exit(1); 
    134138    } 
     139#ifdef NDG_PYTHON_EMBED 
     140    /* Return the daemon's PID */ 
     141    if (retcode > 0) return retcode; 
     142#else 
    135143    /* No need for the parent any more */ 
    136144    if (retcode > 0) _exit(0); 
    137  
     145#endif 
    138146    prpg = 0 ; 
    139147    prpg = setsid () ;     /* disassoiciate from control terminal */ 
     
    214222                incontrolsock = msgsock ; 
    215223                outcontrolsock = msgsock ; 
    216                    return; 
     224#ifdef NDG_PYTHON_EMBED 
     225                return 0; 
     226#else 
     227                return; 
     228#endif 
     229            
    217230                } 
    218231 
Note: See TracChangeset for help on using the changeset viewer.