summaryrefslogtreecommitdiff
path: root/src/libstddjb/child_spawn0.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_spawn0.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_spawn0.c')
-rw-r--r--src/libstddjb/child_spawn0.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstddjb/child_spawn0.c b/src/libstddjb/child_spawn0.c
index d1eddba..8c114b8 100644
--- a/src/libstddjb/child_spawn0.c
+++ b/src/libstddjb/child_spawn0.c
@@ -45,7 +45,9 @@ pid_t child_spawn0 (char const *prog, char const *const *argv, char const *const
#else
#include <unistd.h>
+#include <string.h>
#include <skalibs/allreadwrite.h>
+#include <skalibs/strerr2.h>
#include <skalibs/sig.h>
#include <skalibs/djbunix.h>
@@ -66,6 +68,11 @@ pid_t child_spawn0 (char const *prog, char const *const *argv, char const *const
}
if (!pid)
{
+ size_t len = strlen(PROG) ;
+ char name[len + 9] ;
+ memcpy(name, PROG, len) ;
+ memcpy(name + len, " (child)", 9) ;
+ PROG = name ;
fd_close(p[0]) ;
sig_blocknone() ;
pathexec_run(prog, argv, envp) ;