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;
*/
tty = get_cmdline_val("console", line, sizeof(line));
if (tty == NULL) {
- tty = get_active_console(line, sizeof(line));
+ if (dev_exist("console"))
+ tty = "console";
+ else
+ tty = get_active_console(line, sizeof(line));
}
if (tty != NULL) {
split = strchr(tty, ',');
}
}
+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