diff --git a/src/main-ctl-unix.c b/src/main-ctl-unix.c index 578c1691..d464a411 100644 --- a/src/main-ctl-unix.c +++ b/src/main-ctl-unix.c @@ -623,16 +623,6 @@ static void method_unban_ip(method_ctx *ctx, return; } -static void terminate_proc(main_server_st *s, proc_st *proc) -{ - /* if it has an IP, send a signal so that we cleanup - * and get stats properly */ - if (proc->pid != -1 && proc->pid != 0) - kill(proc->pid, SIGTERM); - else - remove_proc(s, proc, 1); -} - static void method_disconnect_user_name(method_ctx *ctx, int cfd, uint8_t * msg, unsigned msg_size) diff --git a/src/main-ctl.h b/src/main-ctl.h index a93ebd6a..ac3881dd 100644 --- a/src/main-ctl.h +++ b/src/main-ctl.h @@ -9,4 +9,14 @@ void ctl_handler_deinit(main_server_st* s); int ctl_handler_set_fds(main_server_st* s, fd_set *rd_set, fd_set *wr_set); void ctl_handler_run_pending(main_server_st* s, fd_set *rd_set, fd_set *wr_set); +inline static void terminate_proc(main_server_st *s, proc_st *proc) +{ + /* if it has an IP, send a signal so that we cleanup + * and get stats properly */ + if (proc->pid != -1 && proc->pid != 0) + kill(proc->pid, SIGTERM); + else + remove_proc(s, proc, 1); +} + #endif