1 Ensure that the PID file is written before sleeping.
3 Index: xrdp/xrdp/xrdp.c
4 ===================================================================
5 --- xrdp.orig/xrdp/xrdp.c 2012-09-29 13:03:27.666630538 +0200
6 +++ xrdp/xrdp/xrdp.c 2012-09-29 13:03:32.874746622 +0200
15 - g_file_open("/dev/null");
16 - g_file_open("/dev/null");
17 - g_file_open("/dev/null");
18 - /* end of daemonizing code */
22 /* write the pid to file */
24 fd = g_file_open(pid_file); /* xrdp.pid */
26 g_file_write(fd, text, g_strlen(text));
33 + g_file_open("/dev/null");
34 + g_file_open("/dev/null");
35 + g_file_open("/dev/null");
36 + /* end of daemonizing code */
38 g_threadid = tc_get_threadid();
39 g_listen = xrdp_listen_create();