core/src/commands.cpp
changeset 56 9c352d34f5aa
parent 51 3ad902ef5222
child 57 683f4b1f08ce
--- a/core/src/commands.cpp	Tue Sep 07 11:07:30 2010 +0100
+++ b/core/src/commands.cpp	Thu Sep 09 15:38:45 2010 +0100
@@ -5262,7 +5262,11 @@
 	RChildProcess proc;
 	TRAPL(proc.CreateL(command, args, IoSession(), aPcons, &Env()), _L("Could not create process %S"), &command);
 	
+	// Wait for process to rendezvous before returning to close aPcons - we have to give the child time to connect to the console.
+	TRequestStatus status;
+	proc.Process().Rendezvous(status);
 	proc.Detach();
+	User::WaitForRequest(status);
 	proc.Close();
 	}