[Lldb-commits] [lldb] r154977 - /lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm
Enrico Granata
egranata at apple.com
Tue Apr 17 19:02:59 PDT 2012
Author: enrico
Date: Tue Apr 17 21:02:59 2012
New Revision: 154977
URL: http://llvm.org/viewvc/llvm-project?rev=154977&view=rev
Log:
Using the new enhanced RunShellCommand() to implement Host::RunProgramAndGetExitCode() - this centralizes the code we use to launch a process across the board. next step is to enable the remote platforms to launch a process via the RunShellCommand() and obtain all the information that that call is able to provide
Modified:
lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm
Modified: lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm?rev=154977&r1=154976&r2=154977&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm (original)
+++ lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm Tue Apr 17 21:02:59 2012
@@ -1847,7 +1847,11 @@
uint32_t
Host::RunProgramAndGetExitCode (const char *cmd_line)
{
- return ::system(cmd_line);
+ int exit_code;
+ Error err(RunShellCommand(cmd_line, NULL, &exit_code, NULL, NULL, 10));
+ if (err.Fail())
+ return UINT32_MAX;
+ return exit_code;
}
uint32_t
More information about the lldb-commits
mailing list