X-Git-Url: http://git.tuebingen.mpg.de/?p=dss.git;a=blobdiff_plain;f=exec.c;h=920ea0e2e9086bee1b5d82e72a8f051ad32efd3a;hp=adfd24d42ac724593707376ce8b3dc9d585d08e5;hb=3025388040c1521121255e5ae7ceabdcb1b1e421;hpb=06a23c29478453399f46aadbe387124eb03b28da diff --git a/exec.c b/exec.c index adfd24d..920ea0e 100644 --- a/exec.c +++ b/exec.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2011 Andre Noll + * Copyright (C) 2003-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -15,8 +15,9 @@ #include "gcc-compat.h" #include "log.h" -#include "error.h" -#include "string.h" +#include "err.h" +#include "str.h" +#include "exec.h" /** * Spawn a new process using execvp(). @@ -32,7 +33,7 @@ void dss_exec(pid_t *pid, const char *file, char *const *const args) { if ((*pid = fork()) < 0) { - DSS_EMERG_LOG("fork error: %s\n", strerror(errno)); + DSS_EMERG_LOG(("fork error: %s\n", strerror(errno))); exit(EXIT_FAILURE); } if (*pid) /* parent */ @@ -41,7 +42,7 @@ void dss_exec(pid_t *pid, const char *file, char *const *const args) signal(SIGTERM, SIG_DFL); signal(SIGCHLD, SIG_DFL); execvp(file, args); - DSS_EMERG_LOG("execvp error: %s\n", strerror(errno)); + DSS_EMERG_LOG(("execvp error: %s\n", strerror(errno))); _exit(EXIT_FAILURE); } @@ -49,7 +50,7 @@ void dss_exec(pid_t *pid, const char *file, char *const *const args) * Exec the command given as a command line. * * \param pid Will hold the pid of the created process upon return. - * \param cmdline Holds the command and its arguments, seperated by spaces. + * \param cmdline Holds the command and its arguments, separated by spaces. * * This function uses fork/exec to create a new process. *