diff options
Diffstat (limited to 'common')
| -rw-r--r-- | common/os_calls.c | 22 | ||||
| -rw-r--r-- | common/os_calls.h | 2 |
2 files changed, 24 insertions, 0 deletions
diff --git a/common/os_calls.c b/common/os_calls.c index 57bb6a2f..21577a71 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -2833,6 +2833,28 @@ g_setuid(int pid) } /*****************************************************************************/ +int APP_CC +g_setsid(void) +{ +#if defined(_WIN32) + return -1; +#else + return setsid(); +#endif +} + +/*****************************************************************************/ +int APP_CC +g_setlogin(const char *name) +{ +#ifdef BSD + return setlogin(name); +#else + return -1; +#endif +} + +/*****************************************************************************/ /* does not work in win32 returns pid of process that exits or zero if signal occurred */ int APP_CC diff --git a/common/os_calls.h b/common/os_calls.h index a4c05375..c7b6cb09 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -156,6 +156,8 @@ int APP_CC g_initgroups(const char* user, int gid); int APP_CC g_getuid(void); int APP_CC g_getgid(void); int APP_CC g_setuid(int pid); +int APP_CC g_setsid(void); +int APP_CC g_setlogin(const char *name); int APP_CC g_waitchild(void); int APP_CC g_waitpid(int pid); void APP_CC g_clearenv(void); |
