1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

shared/util.c:wait_for_terminate_and_warn(): Add a comment on the return values

This commit is contained in:
Luke Shumaker 2014-06-29 20:18:01 -04:00 committed by Lennart Poettering
parent 3005a221f1
commit 0659e8baf2

View File

@ -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;