Also send SIGKILL to all actions spawned by inittab.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
DEBUG(4, "pid:%d, exitcode:%d\n", proc->pid, ret);
proc->pid = 0;
+ if (a->respawn < 0)
+ return;
+
if (!dev_exist(a->id)) {
DEBUG(4, "Skipping respawn: device '%s' does not exist anymore\n", a->id);
return;
}
}
+void procd_inittab_kill(void)
+{
+ struct init_action *a;
+
+ list_for_each_entry(a, &actions, list) {
+ a->respawn = -1;
+ if (a->proc.pid)
+ kill(a->proc.pid, SIGKILL);
+ }
+}
+
void procd_inittab(void)
{
#define LINE_LEN 128
void procd_signal_preinit(void);
void procd_inittab(void);
void procd_inittab_run(const char *action);
+void procd_inittab_kill(void);
void procd_bcast_event(char *event, struct blob_attr *msg);
struct trigger;
service_avl_stop_all(&containers, &term_timeout);
service_avl_stop_all(&services, &term_timeout);
- /* ToDo: inittab */
+ procd_inittab_kill();
sleep(term_timeout);
}