core/src/commands.cpp
changeset 66 9c352d34f5aa
parent 60 3ad902ef5222
child 67 683f4b1f08ce
equal deleted inserted replaced
62:17466b56148d 66:9c352d34f5aa
  5260 	LeaveIfErr(aPcons.Create(IoSession(), *iName, *iName), _L("Could not create persistent console '%S'"), iName);
  5260 	LeaveIfErr(aPcons.Create(IoSession(), *iName, *iName), _L("Could not create persistent console '%S'"), iName);
  5261 
  5261 
  5262 	RChildProcess proc;
  5262 	RChildProcess proc;
  5263 	TRAPL(proc.CreateL(command, args, IoSession(), aPcons, &Env()), _L("Could not create process %S"), &command);
  5263 	TRAPL(proc.CreateL(command, args, IoSession(), aPcons, &Env()), _L("Could not create process %S"), &command);
  5264 	
  5264 	
       
  5265 	// Wait for process to rendezvous before returning to close aPcons - we have to give the child time to connect to the console.
       
  5266 	TRequestStatus status;
       
  5267 	proc.Process().Rendezvous(status);
  5265 	proc.Detach();
  5268 	proc.Detach();
       
  5269 	User::WaitForRequest(status);
  5266 	proc.Close();
  5270 	proc.Close();
  5267 	}
  5271 	}
  5268 	
  5272 	
  5269 TInt CCmdPcons::DoAttach(RIoPersistentConsole& aPcons, RIoConsole& aNew, RIoPersistentConsole::TCloseBehaviour aOnClose)
  5273 TInt CCmdPcons::DoAttach(RIoPersistentConsole& aPcons, RIoConsole& aNew, RIoPersistentConsole::TCloseBehaviour aOnClose)
  5270 	{
  5274 	{