@@ -48,7 +48,7 @@ static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
4848 [SERVICE_EXITED ] = UNIT_ACTIVE ,
4949 [SERVICE_RELOAD ] = UNIT_RELOADING ,
5050 [SERVICE_STOP ] = UNIT_DEACTIVATING ,
51- [SERVICE_STOP_SIGABRT ] = UNIT_DEACTIVATING ,
51+ [SERVICE_STOP_WATCHDOG ] = UNIT_DEACTIVATING ,
5252 [SERVICE_STOP_SIGTERM ] = UNIT_DEACTIVATING ,
5353 [SERVICE_STOP_SIGKILL ] = UNIT_DEACTIVATING ,
5454 [SERVICE_STOP_POST ] = UNIT_DEACTIVATING ,
@@ -69,7 +69,7 @@ static const UnitActiveState state_translation_table_idle[_SERVICE_STATE_MAX] =
6969 [SERVICE_EXITED ] = UNIT_ACTIVE ,
7070 [SERVICE_RELOAD ] = UNIT_RELOADING ,
7171 [SERVICE_STOP ] = UNIT_DEACTIVATING ,
72- [SERVICE_STOP_SIGABRT ] = UNIT_DEACTIVATING ,
72+ [SERVICE_STOP_WATCHDOG ] = UNIT_DEACTIVATING ,
7373 [SERVICE_STOP_SIGTERM ] = UNIT_DEACTIVATING ,
7474 [SERVICE_STOP_SIGKILL ] = UNIT_DEACTIVATING ,
7575 [SERVICE_STOP_POST ] = UNIT_DEACTIVATING ,
@@ -1031,15 +1031,15 @@ static void service_set_state(Service *s, ServiceState state) {
10311031 SERVICE_START_PRE , SERVICE_START , SERVICE_START_POST ,
10321032 SERVICE_RUNNING ,
10331033 SERVICE_RELOAD ,
1034- SERVICE_STOP , SERVICE_STOP_SIGABRT , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
1034+ SERVICE_STOP , SERVICE_STOP_WATCHDOG , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
10351035 SERVICE_FINAL_SIGTERM , SERVICE_FINAL_SIGKILL ,
10361036 SERVICE_AUTO_RESTART ))
10371037 s -> timer_event_source = sd_event_source_unref (s -> timer_event_source );
10381038
10391039 if (!IN_SET (state ,
10401040 SERVICE_START , SERVICE_START_POST ,
10411041 SERVICE_RUNNING , SERVICE_RELOAD ,
1042- SERVICE_STOP , SERVICE_STOP_SIGABRT , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
1042+ SERVICE_STOP , SERVICE_STOP_WATCHDOG , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
10431043 SERVICE_FINAL_SIGTERM , SERVICE_FINAL_SIGKILL )) {
10441044 service_unwatch_main_pid (s );
10451045 s -> main_command = NULL ;
@@ -1048,7 +1048,7 @@ static void service_set_state(Service *s, ServiceState state) {
10481048 if (!IN_SET (state ,
10491049 SERVICE_START_PRE , SERVICE_START , SERVICE_START_POST ,
10501050 SERVICE_RELOAD ,
1051- SERVICE_STOP , SERVICE_STOP_SIGABRT , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
1051+ SERVICE_STOP , SERVICE_STOP_WATCHDOG , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
10521052 SERVICE_FINAL_SIGTERM , SERVICE_FINAL_SIGKILL )) {
10531053 service_unwatch_control_pid (s );
10541054 s -> control_command = NULL ;
@@ -1063,7 +1063,7 @@ static void service_set_state(Service *s, ServiceState state) {
10631063 if (!IN_SET (state ,
10641064 SERVICE_START_PRE , SERVICE_START , SERVICE_START_POST ,
10651065 SERVICE_RUNNING , SERVICE_RELOAD ,
1066- SERVICE_STOP , SERVICE_STOP_SIGABRT , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
1066+ SERVICE_STOP , SERVICE_STOP_WATCHDOG , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
10671067 SERVICE_FINAL_SIGTERM , SERVICE_FINAL_SIGKILL ) &&
10681068 !(state == SERVICE_DEAD && UNIT (s )-> job ))
10691069 service_close_socket_fd (s );
@@ -1102,7 +1102,7 @@ static usec_t service_coldplug_timeout(Service *s) {
11021102 return usec_add (UNIT (s )-> active_enter_timestamp .monotonic , s -> runtime_max_usec );
11031103
11041104 case SERVICE_STOP :
1105- case SERVICE_STOP_SIGABRT :
1105+ case SERVICE_STOP_WATCHDOG :
11061106 case SERVICE_STOP_SIGTERM :
11071107 case SERVICE_STOP_SIGKILL :
11081108 case SERVICE_STOP_POST :
@@ -1137,7 +1137,7 @@ static int service_coldplug(Unit *u) {
11371137 (IN_SET (s -> deserialized_state ,
11381138 SERVICE_START , SERVICE_START_POST ,
11391139 SERVICE_RUNNING , SERVICE_RELOAD ,
1140- SERVICE_STOP , SERVICE_STOP_SIGABRT , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
1140+ SERVICE_STOP , SERVICE_STOP_WATCHDOG , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
11411141 SERVICE_FINAL_SIGTERM , SERVICE_FINAL_SIGKILL ))) {
11421142 r = unit_watch_pid (UNIT (s ), s -> main_pid );
11431143 if (r < 0 )
@@ -1149,7 +1149,7 @@ static int service_coldplug(Unit *u) {
11491149 IN_SET (s -> deserialized_state ,
11501150 SERVICE_START_PRE , SERVICE_START , SERVICE_START_POST ,
11511151 SERVICE_RELOAD ,
1152- SERVICE_STOP , SERVICE_STOP_SIGABRT , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
1152+ SERVICE_STOP , SERVICE_STOP_WATCHDOG , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
11531153 SERVICE_FINAL_SIGTERM , SERVICE_FINAL_SIGKILL )) {
11541154 r = unit_watch_pid (UNIT (s ), s -> control_pid );
11551155 if (r < 0 )
@@ -1780,8 +1780,8 @@ static void service_enter_stop_post(Service *s, ServiceResult f) {
17801780static int state_to_kill_operation (ServiceState state ) {
17811781 switch (state ) {
17821782
1783- case SERVICE_STOP_SIGABRT :
1784- return KILL_ABORT ;
1783+ case SERVICE_STOP_WATCHDOG :
1784+ return KILL_WATCHDOG ;
17851785
17861786 case SERVICE_STOP_SIGTERM :
17871787 case SERVICE_FINAL_SIGTERM :
@@ -1827,9 +1827,9 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f
18271827 goto fail ;
18281828
18291829 service_set_state (s , state );
1830- } else if (IN_SET (state , SERVICE_STOP_SIGABRT , SERVICE_STOP_SIGTERM ) && s -> kill_context .send_sigkill )
1830+ } else if (IN_SET (state , SERVICE_STOP_WATCHDOG , SERVICE_STOP_SIGTERM ) && s -> kill_context .send_sigkill )
18311831 service_enter_signal (s , SERVICE_STOP_SIGKILL , SERVICE_SUCCESS );
1832- else if (IN_SET (state , SERVICE_STOP_SIGABRT , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL ))
1832+ else if (IN_SET (state , SERVICE_STOP_WATCHDOG , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL ))
18331833 service_enter_stop_post (s , SERVICE_SUCCESS );
18341834 else if (state == SERVICE_FINAL_SIGTERM && s -> kill_context .send_sigkill )
18351835 service_enter_signal (s , SERVICE_FINAL_SIGKILL , SERVICE_SUCCESS );
@@ -1841,7 +1841,7 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f
18411841fail :
18421842 log_unit_warning_errno (UNIT (s ), r , "Failed to kill processes: %m" );
18431843
1844- if (IN_SET (state , SERVICE_STOP_SIGABRT , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL ))
1844+ if (IN_SET (state , SERVICE_STOP_WATCHDOG , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL ))
18451845 service_enter_stop_post (s , SERVICE_FAILURE_RESOURCES );
18461846 else
18471847 service_enter_dead (s , SERVICE_FAILURE_RESOURCES , true);
@@ -2291,7 +2291,7 @@ static int service_start(Unit *u) {
22912291 /* We cannot fulfill this request right now, try again later
22922292 * please! */
22932293 if (IN_SET (s -> state ,
2294- SERVICE_STOP , SERVICE_STOP_SIGABRT , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
2294+ SERVICE_STOP , SERVICE_STOP_WATCHDOG , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
22952295 SERVICE_FINAL_SIGTERM , SERVICE_FINAL_SIGKILL ))
22962296 return - EAGAIN ;
22972297
@@ -2361,7 +2361,7 @@ static int service_stop(Unit *u) {
23612361
23622362 /* Already on it */
23632363 if (IN_SET (s -> state ,
2364- SERVICE_STOP , SERVICE_STOP_SIGABRT , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
2364+ SERVICE_STOP , SERVICE_STOP_WATCHDOG , SERVICE_STOP_SIGTERM , SERVICE_STOP_SIGKILL , SERVICE_STOP_POST ,
23652365 SERVICE_FINAL_SIGTERM , SERVICE_FINAL_SIGKILL ))
23662366 return 0 ;
23672367
@@ -3130,7 +3130,7 @@ static void service_notify_cgroup_empty_event(Unit *u) {
31303130 service_enter_running (s , SERVICE_SUCCESS );
31313131 break ;
31323132
3133- case SERVICE_STOP_SIGABRT :
3133+ case SERVICE_STOP_WATCHDOG :
31343134 case SERVICE_STOP_SIGTERM :
31353135 case SERVICE_STOP_SIGKILL :
31363136
@@ -3274,7 +3274,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
32743274 service_enter_running (s , f );
32753275 break ;
32763276
3277- case SERVICE_STOP_SIGABRT :
3277+ case SERVICE_STOP_WATCHDOG :
32783278 case SERVICE_STOP_SIGTERM :
32793279 case SERVICE_STOP_SIGKILL :
32803280
@@ -3409,7 +3409,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
34093409 service_enter_signal (s , SERVICE_STOP_SIGTERM , f );
34103410 break ;
34113411
3412- case SERVICE_STOP_SIGABRT :
3412+ case SERVICE_STOP_WATCHDOG :
34133413 case SERVICE_STOP_SIGTERM :
34143414 case SERVICE_STOP_SIGKILL :
34153415 if (main_pid_good (s ) <= 0 )
@@ -3480,8 +3480,8 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
34803480 service_enter_signal (s , SERVICE_STOP_SIGTERM , SERVICE_FAILURE_TIMEOUT );
34813481 break ;
34823482
3483- case SERVICE_STOP_SIGABRT :
3484- log_unit_warning (UNIT (s ), "State 'stop-sigabrt ' timed out. Terminating." );
3483+ case SERVICE_STOP_WATCHDOG :
3484+ log_unit_warning (UNIT (s ), "State 'stop-watchdog ' timed out. Terminating." );
34853485 service_enter_signal (s , SERVICE_STOP_SIGTERM , SERVICE_FAILURE_TIMEOUT );
34863486 break ;
34873487
@@ -3560,7 +3560,7 @@ static int service_dispatch_watchdog(sd_event_source *source, usec_t usec, void
35603560 log_unit_error (UNIT (s ), "Watchdog timeout (limit %s)!" ,
35613561 format_timespan (t , sizeof (t ), watchdog_usec , 1 ));
35623562
3563- service_enter_signal (s , SERVICE_STOP_SIGABRT , SERVICE_FAILURE_WATCHDOG );
3563+ service_enter_signal (s , SERVICE_STOP_WATCHDOG , SERVICE_FAILURE_WATCHDOG );
35643564 } else
35653565 log_unit_warning (UNIT (s ), "Watchdog disabled! Ignoring watchdog timeout (limit %s)!" ,
35663566 format_timespan (t , sizeof (t ), watchdog_usec , 1 ));
@@ -3967,7 +3967,7 @@ static bool service_needs_console(Unit *u) {
39673967 SERVICE_RUNNING ,
39683968 SERVICE_RELOAD ,
39693969 SERVICE_STOP ,
3970- SERVICE_STOP_SIGABRT ,
3970+ SERVICE_STOP_WATCHDOG ,
39713971 SERVICE_STOP_SIGTERM ,
39723972 SERVICE_STOP_SIGKILL ,
39733973 SERVICE_STOP_POST ,
0 commit comments