The following commit has been merged in the master branch:
commit f82c23a76d028c3b7d4df41d51a8eaacb5162b88
Author: Guillem Jover <[email protected]>
Date: Thu Sep 15 04:41:30 2011 +0200
s-s-d: Fix do_procinit() on OSHurd, OShpux and HAVE_KVM_H
The function on those systems did not have their return code updated
for the status code.
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 429358f..7def952 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -1297,33 +1297,47 @@ check_proc_stat(struct proc_stat *ps)
return 0;
}
-static void
+static enum status_code
do_procinit(void)
{
if (!procset)
init_procset();
proc_stat_list_for_each(procset, check_proc_stat);
+
+ if (found)
+ return status_ok;
+ else
+ return status_dead;
}
#elif defined(OShpux)
-static void
+static enum status_code
do_procinit(void)
{
struct pst_status pst[10];
int i, count;
int idx = 0;
+ enum status_code prog_status = status_dead;
while ((count = pstat_getproc(pst, sizeof(pst[0]), 10, idx)) > 0) {
- for (i = 0; i < count; i++)
- pid_check(pst[i].pst_pid);
+ enum status_code pid_status;
+
+ for (i = 0; i < count; i++) {
+ pid_status = pid_check(pst[i].pst_pid);
+ if (pid_status < prog_status)
+ prog_status = pid_status;
+ }
idx = pst[count - 1].pst_idx + 1;
}
+
+ return prog_status;
}
#elif defined(HAVE_KVM_H)
-static void
+static enum status_code
do_procinit(void)
{
/* Nothing to do. */
+ return status_unknown;
}
#endif
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]