mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 10:35:40 +08:00
Fix daemonize in *nix
This commit is contained in:
parent
4e4f71712d
commit
b242d6df8c
@ -17,6 +17,13 @@ int randomizer = 1;
|
||||
|
||||
#ifndef _WIN32
|
||||
pthread_attr_t pa;
|
||||
|
||||
|
||||
void daemonize(void){
|
||||
if(fork()) exit(0);
|
||||
else setsid();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
unsigned char **stringtable = NULL;
|
||||
|
@ -104,7 +104,7 @@
|
||||
#define PTHREAD_STACK_MIN 32768
|
||||
#define sockerror strerror
|
||||
#endif
|
||||
#define daemonize() {if(fork())exit(0); else setsid();}
|
||||
void daemonize(void);
|
||||
#define SLEEPTIME 1000
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
|
Loading…
Reference in New Issue
Block a user