⛏️ index : buildtools.git

author Oliver Tappe <zooey@hirschkaefer.de> 2006-08-13 14:27:48.0 +00:00:00
committer Oliver Tappe <zooey@hirschkaefer.de> 2006-08-13 14:27:48.0 +00:00:00
commit
c4d9c2df99d631b2680ebc94443f70d223844aea [patch]
tree
b4241aebc476e44de92aec2d2fbbb76dc583994f
parent
c8cb9d20d226a62511645bbec413e9615d7c9498
download
c4d9c2df99d631b2680ebc94443f70d223844aea.tar.gz

* fixed bug when waiting for sub-process related to handling of multiple children (as created by piped commands). This caused the compilation of AboutHaiku to fail on Zeta.

git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@18503 a95241bf-73f2-0310-859d-f6bbb57e9c96

Diff

 jam/execunix.c | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/jam/execunix.c b/jam/execunix.c
index 6cde87a..3795c00 100644
--- a/jam/execunix.c
+++ b/jam/execunix.c
@@ -272,29 +272,29 @@
	if( !cmdsrunning )
	    return 0;

	/* Pick up process pid and status */
	do 
	{
	    /* Pick up process pid and status */
    
	while( ( w = wait( &status ) ) == -1 && errno == EINTR )
	    while( ( w = wait( &status ) ) == -1 && errno == EINTR )
		;

	if( w == -1 )
	{
	    printf( "child process(es) lost!\n" );
	    perror("wait");
	    exit( EXITBAD );
	}

	/* Find the process in the cmdtab. */

	for( i = 0; i < MAXJOBS; i++ )
	    if( w == cmdtab[ i ].pid )
		break;

	if( i == MAXJOBS )
	{
	    printf( "waif child found!\n" );
	    exit( EXITBAD );
	}
	    if( w == -1 )
	    {
		printf( "child process(es) lost!\n" );
		perror("wait");
		exit( EXITBAD );
	    }

	    /* Find the process in the cmdtab. */

	    for( i = 0; i < MAXJOBS; i++ )
		if( w == cmdtab[ i ].pid )
		    break;

	    if( i == MAXJOBS )
		printf( "jam: waif child process %ld found, ignoring it!\n", w );
	} while( i == MAXJOBS );

# ifdef USE_EXECNT
	/* Clear the temp file */