Changeset 2675

Show
Ignore:
Timestamp:
02/09/08 01:27:46 (10 months ago)
Author:
dhozac
Message:

We only want to wait on the context if we created it.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/rpm-fake.c

    r2665 r2675  
    9797static bool             is_initialized = false; 
    9898 
     99static bool             ctx_created = false; 
     100 
    99101  //DECLARE(rpm_execcon); 
    100102  //DECLARE(execv); 
     
    271273      xid = rc; 
    272274      res = true; 
     275      ctx_created = true; 
    273276    } 
    274277  } 
     
    511514    if (read(sync_sock, &c, 1)!=1) { /*...*/ } 
    512515    if (write(pw_sock, "Q", 1)!=1) { /*...*/ } 
    513     if (vc_isSupported(vcFEATURE_VWAIT)) { 
    514       if (vc_wait_exit(ctx)==-1) { /*...*/ } 
    515     } 
    516     else { 
    517       /* this can race */ 
    518       if (read(sync_sock, &c, 1)!=0) { /*...*/} 
     516    if (ctx_created) { 
     517      if (vc_isSupported(vcFEATURE_VWAIT)) { 
     518        if (vc_wait_exit(ctx)==-1) { /*...*/ } 
     519      } 
     520      else { 
     521        /* this can race */ 
     522        if (read(sync_sock, &c, 1)!=0) { /*...*/} 
     523      } 
    519524    } 
    520525  }