Lines 175-181
Link Here
|
175 |
/* Any Fatal call can potentially loop by recursion because we |
175 |
/* Any Fatal call can potentially loop by recursion because we |
176 |
* are called from the Quit routine that Fatal indirectly calls |
176 |
* are called from the Quit routine that Fatal indirectly calls |
177 |
* since Fatal should not happen I have left this bug in here */ |
177 |
* since Fatal should not happen I have left this bug in here */ |
178 |
while( _proc_cnt == Max_proc ) { |
178 |
while( _proc_cnt == Max_proc ) { /* This forces sequential execution for Max_proc == 1. */ |
179 |
if( Wait_for_child(FALSE, -1) == -1 ) { |
179 |
if( Wait_for_child(FALSE, -1) == -1 ) { |
180 |
if( ! in_quit() || errno != ECHILD ) |
180 |
if( ! in_quit() || errno != ECHILD ) |
181 |
Fatal( "Lost a child %d: %s", errno, strerror( errno ) ); |
181 |
Fatal( "Lost a child %d: %s", errno, strerror( errno ) ); |
Lines 298-303
Link Here
|
298 |
TALLOC( _procs, Max_proc, PR ); |
298 |
TALLOC( _procs, Max_proc, PR ); |
299 |
} |
299 |
} |
300 |
|
300 |
|
|
|
301 |
printf("s recipe %lu %s\n", Do_time(), target->CE_NAME); |
302 |
fflush(stdout); |
303 |
|
304 |
/* If _use_i!=-1 then this function is called by _finished_child() */ |
301 |
if( (i = _use_i) == -1 ) |
305 |
if( (i = _use_i) == -1 ) |
302 |
for( i=0; i<Max_proc; i++ ) |
306 |
for( i=0; i<Max_proc; i++ ) |
303 |
if( !_procs[i].pr_valid ) |
307 |
if( !_procs[i].pr_valid ) |
Lines 335-341
Link Here
|
335 |
/* Some children we didn't make esp true if using /bin/sh to execute a |
339 |
/* Some children we didn't make esp true if using /bin/sh to execute a |
336 |
* a pipe and feed the output as a makefile into dmake. */ |
340 |
* a pipe and feed the output as a makefile into dmake. */ |
337 |
if( i == Max_proc ) return; |
341 |
if( i == Max_proc ) return; |
338 |
_procs[i].pr_valid = 0; |
342 |
|
|
|
343 |
_procs[i].pr_valid = 0; /* Not a running process anymore. */ |
344 |
printf("e recipe %lu %s\n", Do_time(), _procs[i].pr_target->CE_NAME); |
345 |
fflush(stdout); |
346 |
|
339 |
_proc_cnt--; |
347 |
_proc_cnt--; |
340 |
dir = DmStrDup(Get_current_dir()); |
348 |
dir = DmStrDup(Get_current_dir()); |
341 |
Set_dir( _procs[i].pr_dir ); |
349 |
Set_dir( _procs[i].pr_dir ); |
Lines 357-362
Link Here
|
357 |
_procs[i].pr_recipe = rp->prp_next; |
365 |
_procs[i].pr_recipe = rp->prp_next; |
358 |
|
366 |
|
359 |
_use_i = i; |
367 |
_use_i = i; |
|
|
368 |
/* Run next recipe line. */ |
360 |
runargv( _procs[i].pr_target, rp->prp_ignore, rp->prp_group, |
369 |
runargv( _procs[i].pr_target, rp->prp_ignore, rp->prp_group, |
361 |
rp->prp_last, rp->prp_shell, rp->prp_cmd ); |
370 |
rp->prp_last, rp->prp_shell, rp->prp_cmd ); |
362 |
_use_i = -1; |
371 |
_use_i = -1; |