Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Explicit which syscall fails in case procctl returns EINVAL
Baptiste Daroussin committed 11 years ago
commit be63cc9367adbf50ef8badbc3323a10efe7b4b38
parent 45736d4f42a6d28be8c7fffd557e7696143a16b7
1 file changed +4 -1
modified libpkg/scripts.c
@@ -209,8 +209,11 @@ cleanup:
	if (info.rs_children != 0) {
		killemall.rk_sig = SIGKILL;
		killemall.rk_flags = 0;
-
		if (procctl(P_PID, getpid(), PROC_REAP_KILL, &killemall) != 0)
+
		if (procctl(P_PID, getpid(), PROC_REAP_KILL, &killemall) != 0) {
			pkg_emit_error("Fail to kill children of the scripts");
+
			if (errno == EINVAL)
+
				pkg_emit_errno("procctl", "PROC_REAP_ACQUIRE");
+
		}
	}
	procctl(P_PID, getpid(), PROC_REAP_RELEASE, NULL);
#endif