sesman: cleanup, close xrdp to sesman socket listener when starting a session / forking

ulab-next
Jay Sorg 12 years ago
parent 75f4c3ca58
commit 62a4403dd4

@ -33,6 +33,7 @@
extern tbus g_sync_event; extern tbus g_sync_event;
extern unsigned char g_fixedkey[8]; extern unsigned char g_fixedkey[8];
extern struct config_sesman *g_cfg; /* in sesman.c */ extern struct config_sesman *g_cfg; /* in sesman.c */
extern int g_sck; /* in sesman.c */
extern int g_thread_sck; /* in thread.c */ extern int g_thread_sck; /* in thread.c */
struct session_chain *g_sessions; struct session_chain *g_sessions;
int g_session_count; int g_session_count;
@ -450,6 +451,7 @@ session_start_fork(int width, int height, int bpp, char *username,
} }
else if (pid == 0) /* child sesman */ else if (pid == 0) /* child sesman */
{ {
g_tcp_close(g_sck);
g_tcp_close(g_thread_sck); g_tcp_close(g_thread_sck);
auth_start_session(data, display); auth_start_session(data, display);
g_sprintf(geometry, "%dx%d", width, height); g_sprintf(geometry, "%dx%d", width, height);

Loading…
Cancel
Save