mirror of
https://github.com/troglobit/finit.git
synced 2026-11-27 20:48:24 +00:00
inetd.c: Only ever allow respawn if correct runlevel.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
b644f6f635
commit
872d0d24e7
1 file changed
+2
-1
@@ -169,7 +169,8 @@ int inetd_respawn(pid_t pid)
|
|||||||
inetd_t *inetd = &svc->inetd;
|
inetd_t *inetd = &svc->inetd;
|
||||||
|
|
||||||
svc->pid = 0;
|
svc->pid = 0;
|
||||||
if (!inetd->forking)
|
|
||||||
|
if (ISSET(svc->runlevels, runlevel) && !inetd->forking)
|
||||||
uev_io_set(&inetd->watcher, inetd->watcher.fd, UEV_READ);
|
uev_io_set(&inetd->watcher, inetd->watcher.fd, UEV_READ);
|
||||||
|
|
||||||
return 1; /* It was us! */
|
return 1; /* It was us! */
|
||||||
|
|||||||
Reference in new issue
Block a user