sesman: close sync and term sockets after fork

This commit is contained in:
Jay Sorg 2015-09-27 01:26:22 -07:00
parent 89f449aa01
commit 7889ee638e

View File

@ -43,6 +43,9 @@ 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;
extern tbus g_term_event; /* in sesman.c */
extern tbus g_sync_event; /* in sesman.c */
static int g_sync_width; static int g_sync_width;
static int g_sync_height; static int g_sync_height;
static int g_sync_bpp; static int g_sync_bpp;
@ -525,6 +528,8 @@ 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_term_event);
g_tcp_close(g_sync_event);
g_tcp_close(g_sck); g_tcp_close(g_sck);
g_tcp_close(g_thread_sck); g_tcp_close(g_thread_sck);
g_sprintf(geometry, "%dx%d", width, height); g_sprintf(geometry, "%dx%d", width, height);