mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
only define safe_fork() in systems with linux namespaces
This commit is contained in:
@@ -67,7 +67,7 @@ pid_t safe_fork(void)
|
||||
return -1;
|
||||
return ret;
|
||||
#else
|
||||
return fork();
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,12 @@ typedef void (*sighandler_t)(int);
|
||||
# define SIGHANDLER_T sighandler_t
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) && defined(ENABLE_LINUX_NS)
|
||||
pid_t safe_fork(void);
|
||||
#else
|
||||
# define safe_fork fork
|
||||
#endif
|
||||
|
||||
void pr_set_undumpable(const char* mod);
|
||||
void kill_on_parent_kill(int sig);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user