small fixes: make get_process_state() static and fix typo

This commit is contained in:
Topi Miettinen 2019-05-20 14:37:03 +03:00 committed by Lennart Poettering
parent 0f20dde52e
commit 0a51b45ce4
3 changed files with 2 additions and 3 deletions

View File

@ -44,7 +44,7 @@
#include "terminal-util.h"
#include "user-util.h"
int get_process_state(pid_t pid) {
static int get_process_state(pid_t pid) {
const char *p;
char state;
int r;

View File

@ -31,7 +31,6 @@
_r_; \
})
int 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);

View File

@ -2472,7 +2472,7 @@ static int manager_dispatch_sigchld(sd_event_source *source, void *userdata) {
assert(source);
assert(m);
/* First we call waitd() for a PID and do not reap the zombie. That way we can still access /proc/$PID for it
/* First we call waitid() for a PID and do not reap the zombie. That way we can still access /proc/$PID for it
* while it is a zombie. */
if (waitid(P_ALL, 0, &si, WEXITED|WNOHANG|WNOWAIT) < 0) {