From d24a3f265ec4344b5502ec57df3cf8358f6f1499 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 5 Jan 2004 22:24:10 +0000 Subject: many changes git-svn-id: file:///home/lennart/svn/public/ivam2/trunk@14 dbf6933d-3bce-0310-9bcc-ed052ba35b35 --- src/exec.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/exec.c') diff --git a/src/exec.c b/src/exec.c index d9195c6..fabe757 100644 --- a/src/exec.c +++ b/src/exec.c @@ -164,7 +164,7 @@ static void *oop_read_cb(oop_source *source, int fd, oop_event event, void *user /* Escape */ for (c = start, i = 0; i < s; i++, c++) - if (*c < 32 || *c == 127) + if (*c != '\r' && *c != '\n' && (*c < 32 || *c == 127)) *c = '.'; @@ -197,6 +197,8 @@ pid_t child_process_create(const char *file, char *const argv[], int *ifd, int * int stdout_fds[2]; int stderr_fds[2]; + daemon_log(LOG_INFO, "Executing child process '%s'.", file); + if (pipe(stdin_fds) < 0) { daemon_log(LOG_ERR, "pipe() failed: %s", strerror(errno)); return -1; @@ -296,9 +298,9 @@ pid_t child_process_create(const char *file, char *const argv[], int *ifd, int * exit(1); } } - - execv(file, argv); - daemon_log(LOG_ERR, "exec() failed: %s", strerror(errno)); + + execvp(file, argv); + daemon_log(LOG_ERR, "exec('%s', ...) failed: %s", file, strerror(errno)); exit(1); } } -- cgit