Index: portage_exec.py =================================================================== --- portage_exec.py (revision 2155) +++ portage_exec.py (working copy) @@ -98,7 +98,7 @@ opt_name = mycommand[0] myargs=[opt_name] myargs.extend(mycommand[1:]) - mypid.append(os.fork()) + mypid.insert(0, os.fork()) if mypid[-1] == 0: # this may look ugly, but basically it moves file descriptors around to ensure no # handles that are needed are accidentally closed during the final dup2 calls.