aboutsummaryrefslogtreecommitdiff
path: root/src/sysvinit.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-01-30 14:52:52 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-01-30 14:52:52 +0200
commit7f20aa4f7e26d8f740b55bef98f0c3c78eca0e79 (patch)
treec32e862b002c167a36f4d0f0f1fb9a2f6d626d68 /src/sysvinit.c
parente9379677a3c82753f0d29ef1c3490eec345db3c0 (diff)
downloadpies-7f20aa4f7e26d8f740b55bef98f0c3c78eca0e79.tar.gz
pies-7f20aa4f7e26d8f740b55bef98f0c3c78eca0e79.tar.bz2
Fix configuration reload and telinit q
* src/comp.c (component_link): Always link after the REF. component. If REF is NULL, link at list head. (component_append): New function. (component_create): Use component_append. (component_free): Fix double-free. * src/pies.c (pies_reload): Call sysvinit_runlevel_setup. * src/progman.c (progman_stop_component): Remove inactive components. * src/sysvinit.c (sysvinit_fifo_handler): Schedule ACTION_RELOAD. on receiving INIT_CMD_RUNLVL. (sysvinit_sigtrans): Don't handle SIGHUP.
Diffstat (limited to 'src/sysvinit.c')
-rw-r--r--src/sysvinit.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/sysvinit.c b/src/sysvinit.c
index a4e0d63..d8b7cc5 100644
--- a/src/sysvinit.c
+++ b/src/sysvinit.c
@@ -447,13 +447,21 @@ sysvinit_fifo_handler (int fd, void *data)
{
case INIT_CMD_RUNLVL:
buf.req.runlevel = toupper (buf.req.runlevel);
- if (buf.req.runlevel != runlevel)
- {
- progman_stop ();
- dfl_level = buf.req.runlevel;
- inittrans ();
- }
- break;
+ pies_schedule_action (ACTION_RELOAD);
+ switch (buf.req.runlevel)
+ {
+ case 'Q':
+ break;
+
+ default:
+ if (buf.req.runlevel != runlevel)
+ {
+ progman_stop ();
+ dfl_level = buf.req.runlevel;
+ inittrans ();
+ }
+ }
+ break;
case INIT_CMD_SETENV:
sysvinit_setenv (buf.req.data, sizeof (buf.req.data));
@@ -562,7 +570,6 @@ sysvinit_sigtrans (int sig, int *pact)
break;
case SIGTERM:
case SIGQUIT:
- case SIGHUP:
/* Ignore these signals. */
*pact = ACTION_CONT;
break;

Return to:

Send suggestions and report system problems to the System administrator.