[Reproducible-commits] [dpkg] 35/74: s-s-d: Switch do_start() to return a value instead of exit()ing directly
Mattia Rizzolo
mattia at debian.org
Sun Jul 3 22:22:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to annotated tag 1.18.8
in repository dpkg.
commit 58811966a6b2e6879d29bc438497743668a4442d
Author: Guillem Jover <guillem at debian.org>
Date: Mon May 30 20:02:38 2016 +0200
s-s-d: Switch do_start() to return a value instead of exit()ing directly
---
utils/start-stop-daemon.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 7ff30ea..c04811a 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -2003,7 +2003,7 @@ do_findprocs(void)
return do_procinit();
}
-static void
+static int
do_start(int argc, char **argv)
{
int devnull_fd = -1;
@@ -2015,7 +2015,7 @@ do_start(int argc, char **argv)
if (found) {
if (quietmode <= 0)
printf("%s already running.\n", execname ? execname : "process");
- exit(exitnodo);
+ return exitnodo;
}
if (testmode && quietmode <= 0) {
printf("Would start %s ", startas);
@@ -2041,7 +2041,7 @@ do_start(int argc, char **argv)
printf(".\n");
}
if (testmode)
- exit(0);
+ return 0;
if (quietmode < 0)
printf("Starting %s...\n", startas);
*--argv = startas;
@@ -2345,7 +2345,7 @@ main(int argc, char **argv)
argv += optind;
if (action == ACTION_START)
- do_start(argc, argv);
+ return do_start(argc, argv);
if (action == ACTION_STOP) {
int i = run_stop_schedule();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list