mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 18:45: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
|
#ifndef _WIN32
|
||||||
pthread_attr_t pa;
|
pthread_attr_t pa;
|
||||||
|
|
||||||
|
|
||||||
|
void daemonize(void){
|
||||||
|
if(fork()) exit(0);
|
||||||
|
else setsid();
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned char **stringtable = NULL;
|
unsigned char **stringtable = NULL;
|
||||||
|
@ -104,7 +104,7 @@
|
|||||||
#define PTHREAD_STACK_MIN 32768
|
#define PTHREAD_STACK_MIN 32768
|
||||||
#define sockerror strerror
|
#define sockerror strerror
|
||||||
#endif
|
#endif
|
||||||
#define daemonize() {if(fork())exit(0); else setsid();}
|
void daemonize(void);
|
||||||
#define SLEEPTIME 1000
|
#define SLEEPTIME 1000
|
||||||
#ifndef O_BINARY
|
#ifndef O_BINARY
|
||||||
#define O_BINARY 0
|
#define O_BINARY 0
|
||||||
|
Loading…
Reference in New Issue
Block a user