s->control_command = s->exec_command[SERVICE_EXEC_STOP_POST];
if (s->control_command) {
s->control_command_id = SERVICE_EXEC_STOP_POST;
- pidref_done(&s->control_pid);
r = service_spawn(s,
s->control_command,
s->control_command = s->exec_command[SERVICE_EXEC_STOP];
if (s->control_command) {
s->control_command_id = SERVICE_EXEC_STOP;
- pidref_done(&s->control_pid);
r = service_spawn(s,
s->control_command,
s->control_command = s->exec_command[SERVICE_EXEC_START_POST];
if (s->control_command) {
s->control_command_id = SERVICE_EXEC_START_POST;
- pidref_done(&s->control_pid);
r = service_spawn(s,
s->control_command,
case SERVICE_FORKING:
/* For forking services we wait until the start process exited. */
- pidref_done(&s->control_pid);
s->control_pid = TAKE_PIDREF(pidref);
return service_set_state(s, SERVICE_START);
goto fail;
s->control_command_id = SERVICE_EXEC_CONDITION;
- pidref_done(&s->control_pid);
r = service_spawn(s,
s->control_command,
s->control_command = s->exec_command[SERVICE_EXEC_RELOAD];
if (s->control_command) {
s->control_command_id = SERVICE_EXEC_RELOAD;
- pidref_done(&s->control_pid);
r = service_spawn(s,
s->control_command,
else
timeout = s->timeout_stop_usec;
- pidref_done(&s->control_pid);
-
r = service_spawn(s,
s->control_command,
service_exec_flags(s->control_command_id, /* cred_flag = */ 0),
s->control_command = s->exec_command[SOCKET_EXEC_STOP_POST];
if (s->control_command) {
- pidref_done(&s->control_pid);
-
r = socket_spawn(s, s->control_command, &s->control_pid);
if (r < 0) {
log_unit_warning_errno(UNIT(s), r, "Failed to spawn 'stop-post' task: %m");
s->control_command = s->exec_command[SOCKET_EXEC_STOP_PRE];
if (s->control_command) {
- pidref_done(&s->control_pid);
-
r = socket_spawn(s, s->control_command, &s->control_pid);
if (r < 0) {
log_unit_warning_errno(UNIT(s), r, "Failed to spawn 'stop-pre' task: %m");
s->control_command = s->exec_command[SOCKET_EXEC_START_POST];
if (s->control_command) {
- pidref_done(&s->control_pid);
-
r = socket_spawn(s, s->control_command, &s->control_pid);
if (r < 0) {
log_unit_warning_errno(UNIT(s), r, "Failed to spawn 'start-post' task: %m");
s->control_command = s->exec_command[SOCKET_EXEC_START_PRE];
if (s->control_command) {
- pidref_done(&s->control_pid);
-
r = socket_spawn(s, s->control_command, &s->control_pid);
if (r < 0) {
log_unit_warning_errno(UNIT(s), r, "Failed to spawn 'start-pre' task: %m");
s->control_command = s->control_command->command_next;
- pidref_done(&s->control_pid);
-
r = socket_spawn(s, s->control_command, &s->control_pid);
if (r < 0) {
log_unit_warning_errno(UNIT(s), r, "Failed to spawn next task: %m");