summaryrefslogtreecommitdiff
path: root/devel/libdaemon/patches/patch-libdaemon_dexec.c
blob: bc880e57d3fe0817b8892d06db1008b11a0687f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-libdaemon_dexec.c,v 1.1 2012/12/27 17:01:23 bsiegert Exp $

MirBSD does not have ECANCELED. EINTR is not really the right return value.
IMHO, it should return with exit status set to 127 instead.

--- libdaemon/dexec.c.orig	Thu Dec 13 00:17:52 2012
+++ libdaemon/dexec.c
@@ -203,7 +203,11 @@ int daemon_execv(const char *dir, int *r
             return -1;
         } else {
             if (!WIFEXITED(r)) {
+#ifdef ECANCELED
                 errno = ECANCELED;
+#else
+                errno = EINTR; /* The child was terminated by a signal. */
+#endif
                 return -1;
             }