diff options
author | 2006-03-18 11:04:59 +1000 | |
---|---|---|
committer | 2006-03-18 11:04:59 +1000 | |
commit | 80b4055eab16e5b96015f128367d980f9fee4a1f (patch) | |
tree | 78543381c4579987a114cf38caa16f19bdcea8a9 /exec.c | |
parent | 94b7c8d5e6a758d35f6a198babb0e8a4afb80dcb (diff) |
Add support for the -n switch to skip execution of any commands
darcs-hash:20060318010459-ac50b-9d9e5c489e0e4df2159d8c1d0ff952d42e2a2a82.gz
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -653,8 +653,6 @@ void exec( job_t *j ) pid_t pid; int mypipe[2]; sigset_t chldset; - sigemptyset( &chldset ); - sigaddset( &chldset, SIGCHLD ); int skip_fork; io_data_t pipe_read, pipe_write; @@ -667,6 +665,11 @@ void exec( job_t *j ) */ int exec_error=0; + if( no_exec ) + return; + + sigemptyset( &chldset ); + sigaddset( &chldset, SIGCHLD ); debug( 4, L"Exec job '%ls' with id %d", j->command, j->job_id ); |