diff options
| author | Jay Sorg <jay.sorg@gmail.com> | 2012-05-26 19:00:14 -0700 |
|---|---|---|
| committer | Jay Sorg <jay.sorg@gmail.com> | 2012-05-26 19:00:14 -0700 |
| commit | 0566da74ebd6427a0e716a7a771209045f3dafe9 (patch) | |
| tree | d6c82e2542ee754a694fa738304e55c218d2d009 /xrdp/xrdp.c | |
| parent | 5e72f90bba135d0bfa72346fde55b889ce4ea835 (diff) | |
| download | xrdp-proprietary-0566da74ebd6427a0e716a7a771209045f3dafe9.tar.gz xrdp-proprietary-0566da74ebd6427a0e716a7a771209045f3dafe9.zip | |
xrdp: add fork option to xrdp.ini
Diffstat (limited to 'xrdp/xrdp.c')
| -rw-r--r-- | xrdp/xrdp.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index d88fd677..2975502e 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -25,7 +25,6 @@ static struct xrdp_listen* g_listen = 0; static long g_threadid = 0; /* main threadid */ -static int g_fork_not_thread = 0; static long g_sync_mutex = 0; static long g_sync1_mutex = 0; static tbus g_term_event = 0; @@ -45,14 +44,10 @@ g_xrdp_sync(long (*sync_func)(long param1, long param2), long sync_param1, long sync_result; int sync_command; - if (g_fork_not_thread) - { - /* always main thread, fork mode */ - sync_result = sync_func(sync_param1, sync_param2); - } - else if (tc_threadid_equal(tc_get_threadid(), g_threadid)) + if (tc_threadid_equal(tc_get_threadid(), g_threadid)) { /* this is the main thread, call the function directly */ + /* in fork mode, this always happens too */ sync_result = sync_func(sync_param1, sync_param2); } else @@ -98,7 +93,6 @@ xrdp_shutdown(int sig) void DEFAULT_CC xrdp_child(int sig) { - g_writeln("xrdp_child"); g_waitchild(); } @@ -250,8 +244,7 @@ xrdp_process_params(int argc, char** argv, (g_strncasecmp(option, "--fork", 255) == 0)) { startup_params->fork = 1; - g_fork_not_thread = 1; - g_writeln("running in fork mode"); + g_writeln("--fork parameter found, ini override"); } else { |
