Author: emaste Date: Tue Sep 3 18:04:53 2013 New Revision: 189879 URL: http://llvm.org/viewvc/llvm-project?rev=189879&view=rev Log: Switch '/bin/bash' to '/bin/sh'
/bin/sh is more portable, and all systems with /bin/bash are expected to have /bin/sh as well, even if only a link to bash. Review: http://llvm-reviews.chandlerc.com/D1576 Modified: lldb/trunk/include/lldb/Host/Host.h lldb/trunk/include/lldb/lldb-defines.h lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Target/Process.cpp lldb/trunk/test/functionalities/alias/TestAliases.py lldb/trunk/test/pexpect-2.4/doc/index.html lldb/trunk/test/pexpect-2.4/doc/index.template.html Modified: lldb/trunk/include/lldb/Host/Host.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Host.h?rev=189879&r1=189878&r2=189879&view=diff ============================================================================== --- lldb/trunk/include/lldb/Host/Host.h (original) +++ lldb/trunk/include/lldb/Host/Host.h Tue Sep 3 18:04:53 2013 @@ -473,8 +473,7 @@ public: int *signo_ptr, // Pass NULL if you don't want the signal that caused the process to exit std::string *command_output, // Pass NULL if you don't want the command output uint32_t timeout_sec, - const char *shell = "/bin/sh" - ); + const char *shell = LLDB_DEFAULT_SHELL); static lldb::DataBufferSP GetAuxvData (lldb_private::Process *process); Modified: lldb/trunk/include/lldb/lldb-defines.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-defines.h?rev=189879&r1=189878&r2=189879&view=diff ============================================================================== --- lldb/trunk/include/lldb/lldb-defines.h (original) +++ lldb/trunk/include/lldb/lldb-defines.h Tue Sep 3 18:04:53 2013 @@ -33,6 +33,7 @@ // LLDB defines //---------------------------------------------------------------------- #define LLDB_GENERIC_ERROR UINT32_MAX +#define LLDB_DEFAULT_SHELL "/bin/sh" //---------------------------------------------------------------------- // Breakpoints Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=189879&r1=189878&r2=189879&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Tue Sep 3 18:04:53 2013 @@ -318,7 +318,7 @@ CommandInterpreter::Initialize () #if defined (__arm__) ProcessAliasOptionsArgs (cmd_obj_sp, "--", alias_arguments_vector_sp); #else - ProcessAliasOptionsArgs (cmd_obj_sp, "--shell=/bin/bash --", alias_arguments_vector_sp); + ProcessAliasOptionsArgs (cmd_obj_sp, "--shell=" LLDB_DEFAULT_SHELL, alias_arguments_vector_sp); #endif AddAlias ("r", cmd_obj_sp); AddAlias ("run", cmd_obj_sp); Modified: lldb/trunk/source/Target/Process.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=189879&r1=189878&r2=189879&view=diff ============================================================================== --- lldb/trunk/source/Target/Process.cpp (original) +++ lldb/trunk/source/Target/Process.cpp Tue Sep 3 18:04:53 2013 @@ -816,7 +816,7 @@ ProcessLaunchCommandOptions::SetOptionVa if (option_arg && option_arg[0]) launch_info.SetShell (option_arg); else - launch_info.SetShell ("/bin/bash"); + launch_info.SetShell (LLDB_DEFAULT_SHELL); break; case 'v': Modified: lldb/trunk/test/functionalities/alias/TestAliases.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/alias/TestAliases.py?rev=189879&r1=189878&r2=189879&view=diff ============================================================================== --- lldb/trunk/test/functionalities/alias/TestAliases.py (original) +++ lldb/trunk/test/functionalities/alias/TestAliases.py Tue Sep 3 18:04:53 2013 @@ -109,16 +109,16 @@ class AliasTestCase(TestBase): self.expect ("help run", - substrs = [ "'run' is an abbreviation for 'process launch -c /bin/bash --'" ]) + substrs = [ "'run' is an abbreviation for 'process launch -c /bin/sh --'" ]) self.expect ("help -a run", - substrs = [ "'run' is an abbreviation for 'process launch -c /bin/bash --'" ]) + substrs = [ "'run' is an abbreviation for 'process launch -c /bin/sh --'" ]) self.expect ("help -a", - substrs = [ 'run', 'process launch -c /bin/bash' ]) + substrs = [ 'run', 'process launch -c /bin/sh' ]) self.expect ("help", matching=False, - substrs = [ "'run'", 'process launch -c /bin/bash' ]) + substrs = [ "'run'", 'process launch -c /bin/sh' ]) self.expect ("run", patterns = [ "Process .* launched: .*a.out" ]) Modified: lldb/trunk/test/pexpect-2.4/doc/index.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/pexpect-2.4/doc/index.html?rev=189879&r1=189878&r2=189879&view=diff ============================================================================== --- lldb/trunk/test/pexpect-2.4/doc/index.html (original) +++ lldb/trunk/test/pexpect-2.4/doc/index.html Tue Sep 3 18:04:53 2013 @@ -362,7 +362,7 @@ command and pipe it through another comm For example: <pre> - child = pexpect.spawn('/bin/bash -c "ls -l | grep LOG > log_list.txt"') + child = pexpect.spawn('/bin/sh -c "ls -l | grep LOG > log_list.txt"') child.expect(pexpect.EOF) </pre> @@ -373,7 +373,7 @@ the previous example: <pre> shell_cmd = 'ls -l | grep LOG > log_list.txt' - child = pexpect.spawn ('/bin/bash', ['-c', shell_cmd]) + child = pexpect.spawn ('/bin/sh', ['-c', shell_cmd]) child.expect (pexpect.EOF) </pre> Modified: lldb/trunk/test/pexpect-2.4/doc/index.template.html URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/pexpect-2.4/doc/index.template.html?rev=189879&r1=189878&r2=189879&view=diff ============================================================================== --- lldb/trunk/test/pexpect-2.4/doc/index.template.html (original) +++ lldb/trunk/test/pexpect-2.4/doc/index.template.html Tue Sep 3 18:04:53 2013 @@ -362,7 +362,7 @@ command and pipe it through another comm For example: <pre> - child = pexpect.spawn('/bin/bash -c "ls -l | grep LOG > log_list.txt"') + child = pexpect.spawn('/bin/sh -c "ls -l | grep LOG > log_list.txt"') child.expect(pexpect.EOF) </pre> @@ -373,7 +373,7 @@ the previous example: <pre> shell_cmd = 'ls -l | grep LOG > log_list.txt' - child = pexpect.spawn ('/bin/bash', ['-c', shell_cmd]) + child = pexpect.spawn ('/bin/sh', ['-c', shell_cmd]) child.expect (pexpect.EOF) </pre> _______________________________________________ lldb-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
