projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d31974
)
core: check for return value from get_process_state
author
Yuxuan Shui
<yshuiv7@gmail.com>
Sat, 15 Feb 2014 05:20:55 +0000
(13:20 +0800)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Sun, 16 Feb 2014 16:09:51 +0000
(11:09 -0500)
Fix for commit
e10c9985bb
.
src/core/service.c
patch
|
blob
|
history
diff --git
a/src/core/service.c
b/src/core/service.c
index
3a2ef01
..
8e07bd0
100644
(file)
--- a/
src/core/service.c
+++ b/
src/core/service.c
@@
-1376,7
+1376,13
@@
static int service_load_pid_file(Service *s, bool may_warn) {
return -ESRCH;
}
- if (get_process_state(pid) == 'Z') {
+ r = get_process_state(pid);
+ if (r < 0) {
+ if (may_warn)
+ log_info_unit(UNIT(s)->id, "Failed to read /proc/%d/stat: %s",
+ pid, strerror(-r));
+ return r;
+ } else if (r == 'Z') {
if (may_warn)
log_info_unit(UNIT(s)->id,
"PID "PID_FMT" read from file %s is a zombie.",