summaryrefslogtreecommitdiff
path: root/src/libstddjb/child_spawn1_internal.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-02-17 22:30:53 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-02-17 22:30:53 +0000
commitfdffefb8032922ce7ffe4c00816072a8ff2148fc (patch)
treebc7313151a429c45d8bab8ad8b9dd32f4e51335f /src/libstddjb/child_spawn1_internal.c
parenta896ca2a8c617e5e00ffd5fc9e69331ad754e5b3 (diff)
downloadskalibs-fdffefb8032922ce7ffe4c00816072a8ff2148fc.tar.xz
More types changes
New disize Add size_t to the autotypes list Delete redundant and replace-libc files dev_t/ino_t pass Big size_t pass More things missing, still not operational yet
Diffstat (limited to 'src/libstddjb/child_spawn1_internal.c')
-rw-r--r--src/libstddjb/child_spawn1_internal.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstddjb/child_spawn1_internal.c b/src/libstddjb/child_spawn1_internal.c
index f833a15..8bd1678 100644
--- a/src/libstddjb/child_spawn1_internal.c
+++ b/src/libstddjb/child_spawn1_internal.c
@@ -66,7 +66,9 @@ pid_t child_spawn1_internal (char const *prog, char const *const *argv, char con
#else
+#include <string.h>
#include <skalibs/allreadwrite.h>
+#include <skalibs/strerr2.h>
#include <skalibs/sig.h>
pid_t child_spawn1_internal (char const *prog, char const *const *argv, char const *const *envp, int *p, int to)
@@ -95,6 +97,11 @@ pid_t child_spawn1_internal (char const *prog, char const *const *argv, char con
}
if (!pid)
{
+ size_t len = strlen(PROG) ;
+ char name[len + 9] ;
+ memcpy(name, PROG, len) ;
+ memcpy(name + len, " (child)", 9) ;
+ PROG = name ;
fd_close(syncp[0]) ;
fd_close(p[!(to & 1)]) ;
if (fd_move(to & 1, p[to & 1]) < 0) goto err ;