Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix return code from rc scripts
Baptiste Daroussin committed 14 years ago
commit 0201dddd055264682525dff4825630bfd52b8cd0
parent a9da32e
1 file changed +3 -3
modified libpkg/rcscripts.c
@@ -104,7 +104,7 @@ rc_stop(const char *rc_file)
			return (-1);
	}

-
	if (pstat != 0)
+
	if (WEXITSTATUS(pstat) != 0)
		return (0);

	switch ((pid = fork())) {
@@ -125,7 +125,7 @@ rc_stop(const char *rc_file)
			return (-1);
	}

-
	return (pstat);
+
	return (WEXITSTATUS(pstat));
}

static int
@@ -155,7 +155,7 @@ rc_start(const char *rc_file)
			return (-1);
	}

-
	return (pstat);
+
	return (WEXITSTATUS(pstat));
}