diff options
author | axel <axel@liljencrantz.se> | 2006-02-04 03:27:36 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-02-04 03:27:36 +1000 |
commit | f13262d87ea977a023d9f031407aa38c0e576447 (patch) | |
tree | 81b6a513f662ecf610caa4076b252cf0f1fa6d41 /exec.c | |
parent | f71cd494def1ef2e7078cf1fdf617e9600f10234 (diff) |
Move parts of the command description lookup code to a shellscript function
darcs-hash:20060203172736-ac50b-95430eb4ca0d7ee2859237e8543a4e0883349fdb.gz
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -392,20 +392,20 @@ static int handle_child_io( io_data_t *io, int exit_on_error ) static int setup_child_process( job_t *j, process_t *p ) { int res; - + if( j->job_control ) { pid_t pid; /* Put the process into the process group and give the process - group the terminal, if appropriate. This has to be done + group the terminal, if appropriate. This has to be done both by the shell and in the individual child processes because of potential race conditions. */ pid = getpid (); if (j->pgid == 0) j->pgid = pid; - + /* Wait till shell puts us in our own group */ while( getpgrp() != j->pgid ) sleep(0); @@ -419,7 +419,7 @@ static int setup_child_process( job_t *j, process_t *p ) } res = handle_child_io( j->io, (p==0) ); - + /* Set the handling for job control signals back to the default. */ if( res ) { |