core: treat ECHILD as child already terminated
prevents: NetworkManager[2775]: <error> [1429889302.113450] [NetworkManagerUtils.c:576] nm_utils_kill_child_async(): kill child process 'teamd' (3025): failed due to unexpected return value -1 by waitpid (No child processes, 10) after sending SIGTERM (15)
This commit is contained in:
@@ -566,7 +566,7 @@ nm_utils_kill_child_async (pid_t pid, int sig, guint64 log_domain,
|
|||||||
|
|
||||||
/* let's try again with waitpid, probably there was a race... */
|
/* let's try again with waitpid, probably there was a race... */
|
||||||
ret = waitpid (pid, &status, 0);
|
ret = waitpid (pid, &status, 0);
|
||||||
if (ret > 0) {
|
if (ret > 0 || (ret < 0 && errno == ECHILD)) {
|
||||||
nm_log_dbg (log_domain, LOG_NAME_FMT ": process %ld already terminated %s",
|
nm_log_dbg (log_domain, LOG_NAME_FMT ": process %ld already terminated %s",
|
||||||
LOG_NAME_ARGS, (long) ret, _kc_exit_to_string (buf_exit, status));
|
LOG_NAME_ARGS, (long) ret, _kc_exit_to_string (buf_exit, status));
|
||||||
_kc_invoke_callback (pid, log_domain, log_name, callback, user_data, TRUE, status);
|
_kc_invoke_callback (pid, log_domain, log_name, callback, user_data, TRUE, status);
|
||||||
|
Reference in New Issue
Block a user