diff options
Diffstat (limited to 'src/exec.c')
-rw-r--r-- | src/exec.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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); } } |