chiark / gitweb /
shared/util.c:wait_for_terminate_and_warn(): Add a comment on the return values
authorLuke Shumaker <LukeShu@sbcglobal.net>
Mon, 30 Jun 2014 00:18:01 +0000 (20:18 -0400)
committerLennart Poettering <lennart@poettering.net>
Mon, 30 Jun 2014 13:13:34 +0000 (15:13 +0200)
src/shared/util.c

index af6bde2c3dd280e8c3f72f090d035d8d88b32e17..e75f6c9df33c7f8439f3172e47a7dcf7bcebe9eb 100644 (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;