diff options
author | Thomas Haller <thaller@redhat.com> | 2022-02-22 17:54:56 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-03-11 14:41:36 +0100 |
commit | 239b3ca2abc9540e4e877b7f7eb32dcd6ddefa4f (patch) | |
tree | f18f4b539315db87c54580171a7f1dc83aee86b7 | |
parent | ae0cc9618c49bb74bbe54a073dc337e9a3b0005b (diff) | |
download | NetworkManager-239b3ca2abc9540e4e877b7f7eb32dcd6ddefa4f.tar.gz |
core: log warning when sending SIGKILL in nm_utils_kill_child_async()
Processes really should wrap up in a timely manner. If they don't, then
something bad happened somewhere and we should log a warning about that.
-rw-r--r-- | src/core/nm-core-utils.c | 8 | ||||
-rw-r--r-- | src/core/tests/test-core-with-expect.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/core/nm-core-utils.c b/src/core/nm-core-utils.c index c8b789b30a..9b75519558 100644 --- a/src/core/nm-core-utils.c +++ b/src/core/nm-core-utils.c @@ -411,10 +411,10 @@ _kc_cb_timeout_grace_period(void *user_data) errsv); } } else { - nm_log_dbg(data->log_domain, - "%s: process not terminated after %ld usec. Sending SIGKILL signal", - data->log_name, - (long) (nm_utils_get_monotonic_timestamp_usec() - data->async.wait_start_us)); + nm_log_warn(data->log_domain, + "%s: process not terminated after %ld usec. Sending SIGKILL signal", + data->log_name, + (long) (nm_utils_get_monotonic_timestamp_usec() - data->async.wait_start_us)); } return G_SOURCE_REMOVE; diff --git a/src/core/tests/test-core-with-expect.c b/src/core/tests/test-core-with-expect.c index eca098c438..29a14c0a90 100644 --- a/src/core/tests/test-core-with-expect.c +++ b/src/core/tests/test-core-with-expect.c @@ -369,8 +369,8 @@ do_test_nm_utils_kill_child(void) NMTST_EXPECT_NM_DEBUG("kill child process 'test-a-1-3' (*): wait for process to terminate " "after sending no signal (0) (send SIGKILL in 1 milliseconds)..."); - NMTST_EXPECT_NM_DEBUG("kill child process 'test-a-1-3' (*): process not terminated after * " - "usec. Sending SIGKILL signal"); + NMTST_EXPECT_NM_WARN("kill child process 'test-a-1-3' (*): process not terminated after * " + "usec. Sending SIGKILL signal"); NMTST_EXPECT_NM_DEBUG( "kill child process 'test-a-1-3' (*): terminated by signal 9 (* usec elapsed)"); test_nm_utils_kill_child_async_do("test-a-1-3", pid1a_3, 0, 1, TRUE, &expected_signal_KILL); @@ -405,8 +405,8 @@ do_test_nm_utils_kill_child(void) NMTST_EXPECT_NM_DEBUG("kill child process 'test-a-4' (*): wait for process to terminate after " "sending SIGTERM (15) (send SIGKILL in 1 milliseconds)..."); - NMTST_EXPECT_NM_DEBUG("kill child process 'test-a-4' (*): process not terminated after * usec. " - "Sending SIGKILL signal"); + NMTST_EXPECT_NM_WARN("kill child process 'test-a-4' (*): process not terminated after * usec. " + "Sending SIGKILL signal"); NMTST_EXPECT_NM_DEBUG( "kill child process 'test-a-4' (*): terminated by signal 9 (* usec elapsed)"); test_nm_utils_kill_child_async_do("test-a-4", pid4a, SIGTERM, 1, TRUE, &expected_signal_KILL); |