summaryrefslogtreecommitdiffabout
path: root/src/prog.h
authorSergey Poznyakoff <gray@gnu.org>2016-02-18 13:23:30 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2016-02-18 13:33:34 (GMT)
commit0a55965bcc28928ae17ca39e3b8e35adf11ea09c (patch) (side-by-side diff)
treeed8f6543999caef2d81b517fb90182be4a984fda /src/prog.h
parentd5302613a00915076b945b25b50eb6b376121955 (diff)
downloadpies-0a55965bcc28928ae17ca39e3b8e35adf11ea09c.tar.gz
pies-0a55965bcc28928ae17ca39e3b8e35adf11ea09c.tar.bz2
Fix activation/deactivation of network listeners.
* src/ctl.c (prog_active): New function. (prog_serialize): Use prog_active to report prog's activity state. For listener components, return also their service and tcpmux master names, if applicable. (fun_stop): Stop listeners as well. (fun_start): Start listeners. (ctlio_end): Don't close fd: this is done by deregister_socket * src/inetd-bi.c (tcpmux_help): Don't list inactive components. * src/prog.h (prog_activate_listener) (prog_deactivate_listener): New protos. * src/progman.c (prog_lookup_by_tag) (prog_lookup_by_service): Remove. (progman_cleanup): Fix coredump (premature free). (progman_stop_component): If component is a listener, deactivate it. (prog_activate_listener) (prog_deactivate_listener): New functions. * src/socket.c (delete_sockinst): Close the socket descriptor. * src/sysvinit.c (sysvinit_fifo_handler, create_fifo): Don't close fd, leave that to deregister_socket.
Diffstat (limited to 'src/prog.h') (more/less context) (ignore whitespace changes)
-rw-r--r--src/prog.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/prog.h b/src/prog.h
index 3b20979..316a229 100644
--- a/src/prog.h
+++ b/src/prog.h
@@ -91,3 +91,6 @@ void prog_stop (struct prog *prog, int sig);
void progman_stop_component (struct prog **prog);
char const *prog_tag (struct prog const *prog);
+
+int prog_activate_listener (struct prog *prog);
+void prog_deactivate_listener (struct prog *prog);

Return to:

Send suggestions and report system problems to the System administrator.