Make wait objects private to sesman.c
This commit is contained in:
parent
5cb5542d91
commit
6bf0aed8dd
@ -74,9 +74,9 @@ struct sesman_startup_params
|
||||
|
||||
struct config_sesman *g_cfg;
|
||||
unsigned char g_fixedkey[8] = { 23, 82, 107, 6, 35, 78, 88, 7 };
|
||||
tintptr g_term_event = 0;
|
||||
tintptr g_sigchld_event = 0;
|
||||
tintptr g_reload_event = 0;
|
||||
static tintptr g_term_event = 0;
|
||||
static tintptr g_sigchld_event = 0;
|
||||
static tintptr g_reload_event = 0;
|
||||
|
||||
static struct trans *g_list_trans;
|
||||
|
||||
@ -322,6 +322,15 @@ sesman_close_all(unsigned int flags)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void
|
||||
sesman_delete_wait_objects(void)
|
||||
{
|
||||
g_delete_wait_obj(g_reload_event);
|
||||
g_delete_wait_obj(g_sigchld_event);
|
||||
g_delete_wait_obj(g_term_event);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
static int
|
||||
sesman_data_in(struct trans *self)
|
||||
@ -965,9 +974,7 @@ main(int argc, char **argv)
|
||||
g_file_delete(pid_file);
|
||||
}
|
||||
|
||||
g_delete_wait_obj(g_reload_event);
|
||||
g_delete_wait_obj(g_sigchld_event);
|
||||
g_delete_wait_obj(g_term_event);
|
||||
sesman_delete_wait_objects();
|
||||
|
||||
if (!daemon)
|
||||
{
|
||||
|
@ -45,9 +45,6 @@ struct sesman_con
|
||||
/* Globals */
|
||||
extern struct config_sesman *g_cfg;
|
||||
extern unsigned char g_fixedkey[8];
|
||||
extern tintptr g_term_event;
|
||||
extern tintptr g_sigchld_event;
|
||||
extern tintptr g_reload_event;
|
||||
|
||||
/**
|
||||
* Set the peername of a connection
|
||||
@ -58,7 +55,7 @@ extern tintptr g_reload_event;
|
||||
int
|
||||
sesman_set_connection_peername(struct sesman_con *sc, const char *name);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Close all file descriptors used by sesman.
|
||||
*
|
||||
* This is generally used after forking, to make sure the
|
||||
@ -75,6 +72,14 @@ sesman_set_connection_peername(struct sesman_con *sc, const char *name);
|
||||
int
|
||||
sesman_close_all(unsigned int flags);
|
||||
|
||||
/**
|
||||
* Delete sesman wait objects.
|
||||
*
|
||||
* Call after forking so we don't break sesman's wait objects
|
||||
*/
|
||||
void
|
||||
sesman_delete_wait_objects(void);
|
||||
|
||||
/*
|
||||
* Remove the listening transport
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user