diff options
author | Yuxuan Shui <yshuiv7@gmail.com> | 2014-02-15 02:38:50 +0800 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-02-14 20:47:52 -0500 |
commit | e10c9985bbc3cf79f12f9ec7317adfe697fa8214 (patch) | |
tree | d0271b53f717e49d46a609c334fab1875d8886b8 /src/shared/util.h | |
parent | f928d3263d788da8dec64f06c792988b6076e600 (diff) |
core: fix detection of dead processes
Commit 5ba6985b moves the UNIT_VTABLE(u)->sigchld_event before systemd
actually reaps the zombie. Which leads to service_load_pid_file accepting
zombie as a valid pid.
This fixes timeouts like:
[ 2746.602243] systemd[1]: chronyd.service stop-sigterm timed out. Killing.
[ 2836.852545] systemd[1]: chronyd.service still around after SIGKILL. Ignoring.
[ 2927.102187] systemd[1]: chronyd.service stop-final-sigterm timed out. Killing.
[ 3017.352560] systemd[1]: chronyd.service still around after final SIGKILL. Entering failed mode.
Diffstat (limited to 'src/shared/util.h')
-rw-r--r-- | src/shared/util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h index 9aea3a4e50..8dede1f7ff 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -238,6 +238,7 @@ char *file_in_same_dir(const char *path, const char *filename); int rmdir_parents(const char *path, const char *stop); +char get_process_state(pid_t pid); int get_process_comm(pid_t pid, char **name); int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char **line); int get_process_exe(pid_t pid, char **name); |