diff options
author | 2012-02-27 18:43:24 -0800 | |
---|---|---|
committer | 2012-02-27 18:43:24 -0800 | |
commit | fdfa5c06028d3473f57cea497a6682a8e550352f (patch) | |
tree | f822ccc211dd331c2b0d99949d0e4288fded0eef /exec.cpp | |
parent | 50ee5d28cdc5b521f2d2feda264ec798e8f3ab8e (diff) |
Some initial work towards resolving nasty fork/pthread issues, and to having a per-parser job list
Diffstat (limited to 'exec.cpp')
-rw-r--r-- | exec.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -831,6 +831,8 @@ static int set_child_group( job_t *j, process_t *p, int print_errors ) */ static pid_t exec_fork() { + ASSERT_IS_MAIN_THREAD(); + pid_t pid; struct timespec pollint; int i; @@ -1047,6 +1049,7 @@ void exec( parser_t &parser, job_t *j ) if( keepalive.pid == 0 ) { + /* Child */ keepalive.pid = getpid(); set_child_group( j, &keepalive, 1 ); pause(); @@ -1054,6 +1057,7 @@ void exec( parser_t &parser, job_t *j ) } else { + /* Parent */ set_child_group( j, &keepalive, 0 ); } } |