Lines Matching refs:spawn
573 Spawn *spawn = userdata;
576 assert(spawn);
578 kill_and_sigcont(spawn->pid, SIGKILL);
580 log_error("spawned process '%s' ["PID_FMT"] timed out after %s, killing", spawn->cmd, spawn->pid,
581 format_timestamp_relative(timeout, sizeof(timeout), spawn->timeout));
587 Spawn *spawn = userdata;
590 assert(spawn);
592 log_warning("spawned process '%s' ["PID_FMT"] is taking longer than %s to complete", spawn->cmd, spawn->pid,
593 format_timestamp_relative(timeout, sizeof(timeout), spawn->timeout));
599 Spawn *spawn = userdata;
601 assert(spawn);
606 log_debug("Process '%s' succeeded.", spawn->cmd);
610 } else if (spawn->accept_failure)
611 log_debug("Process '%s' failed with exit code %i.", spawn->cmd, si->si_status);
613 log_warning("Process '%s' failed with exit code %i.", spawn->cmd, si->si_status);
618 log_warning("Process '%s' terminated by signal %s.", spawn->cmd, signal_to_string(si->si_status));
622 log_error("Process '%s' failed due to unknown reason.", spawn->cmd);
635 Spawn spawn = {
654 spawn.timeout_warn = timeout_warn_usec - age_usec;
657 usec + spawn.timeout_warn, USEC_PER_SEC,
658 on_spawn_timeout_warning, &spawn);
663 spawn.timeout = timeout_usec - age_usec;
666 usec + spawn.timeout, USEC_PER_SEC, on_spawn_timeout, &spawn);
672 r = sd_event_add_child(e, NULL, pid, WEXITED, on_spawn_sigchld, &spawn);