From: Michael Heimpold Date: Tue, 1 Jan 2019 23:44:55 +0000 (+0100) Subject: procd: skip respawn in case device disappeared X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5d6282906baf52258c080872fdc53a311ff5db88;p=oweals%2Fprocd.git procd: skip respawn in case device disappeared Signed-off-by: Michael Heimpold --- diff --git a/inittab.c b/inittab.c index 3175048..b67730c 100644 --- a/inittab.c +++ b/inittab.c @@ -123,6 +123,11 @@ static void child_exit(struct uloop_process *proc, int ret) DEBUG(4, "pid:%d, exitcode:%d\n", proc->pid, ret); proc->pid = 0; + if (!dev_exist(a->id)) { + DEBUG(4, "Skipping respawn: device '%s' does not exist anymore\n", a->id); + return; + } + uloop_timeout_set(&a->tout, a->respawn); }