Add support for the -n switch to skip execution of any commands

darcs-hash:20060318010459-ac50b-9d9e5c489e0e4df2159d8c1d0ff952d42e2a2a82.gz
This commit is contained in:
axel
2006-03-18 11:04:59 +10:00
parent 94b7c8d5e6
commit 80b4055eab
6 changed files with 34 additions and 5 deletions

7
exec.c
View File

@@ -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 );