[systemd-devel] [PATCH v2 1/3] shared/util.c:wait_for_terminate_and_warn(): Add a comment on the return values
Luke Shumaker
LukeShu at sbcglobal.net
Sun Jun 29 17:18:01 PDT 2014
---
src/shared/util.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/shared/util.c b/src/shared/util.c
index e7ff0f8..32358e5 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -3474,6 +3474,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;
--
2.0.1
More information about the systemd-devel
mailing list