diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-29 20:18:01 -0400 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-06-30 15:13:34 +0200 |
commit | 0659e8baf25c86cadac8cac79f4e800501694c8b (patch) | |
tree | 8a34bc7283494f5db5909b559833fc84c0d33094 /src/shared/util.c | |
parent | 3005a221f1f2d7bc6e6f1a4df6b40e7d8bbd7e9e (diff) |
shared/util.c:wait_for_terminate_and_warn(): Add a comment on the return values
Diffstat (limited to 'src/shared/util.c')
-rw-r--r-- | src/shared/util.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index af6bde2c3d..e75f6c9df3 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -3482,6 +3482,17 @@ int wait_for_terminate(pid_t pid, siginfo_t *status) { } } +/* + * Return values: + * < 0 : wait_for_terminate() failed to get the state of the + * process, the process was terminated by a signal, or + * failed for an unknown reason. + * >=0 : The process terminated normally, and its exit code is + * returned. + * + * That is, success is indicated by a return value of zero, and an + * error is indicated by a non-zero value. + */ int wait_for_terminate_and_warn(const char *name, pid_t pid) { int r; siginfo_t status; |