diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2016-03-16 14:32:14 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2016-03-16 14:32:14 -0700 |
commit | 689ffe79d9c79edfce9e5da94d0c4723937df4e9 (patch) | |
tree | 3219eff84dd1df33822ed25c3cc22ee43e77751d /common | |
parent | 38241f2a0bd8909815cce67adb56d29619b19ad1 (diff) | |
download | xrdp-proprietary-689ffe79d9c79edfce9e5da94d0c4723937df4e9.tar.gz xrdp-proprietary-689ffe79d9c79edfce9e5da94d0c4723937df4e9.zip |
fix warnings, move some calls to os_calls
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); |