Mercurial > octave
diff libinterp/interpfcn/toplev.cc @ 15756:ea1a1fb00744
Make the path to the shell interpreter configuable
* configure.ac: Add --with-shell option and define SHELL_PATH.
* libinterp/interp-core/oct-procbuf.cc (octave_procbuf::open),
libinterp/interpfcn/toplev.cc (Fsystem): Use it.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Sat, 08 Dec 2012 16:08:09 -0500 |
parents | 5f031158c693 |
children | 5b2126a8c84f |
line wrap: on
line diff
--- a/libinterp/interpfcn/toplev.cc Sat Dec 08 08:27:03 2012 -0800 +++ b/libinterp/interpfcn/toplev.cc Sat Dec 08 16:08:09 2012 -0500 @@ -77,6 +77,10 @@ #include "variables.h" #include "version.h" +#ifndef SHELL_PATH +#define SHELL_PATH "/bin/sh" +#endif + void (*octave_exit) (int) = ::exit; // TRUE means the quit() call is allowed. @@ -950,7 +954,7 @@ // FIXME -- should probably replace this // call with something portable. - execl ("/bin/sh", "sh", "-c", cmd_str.c_str (), + execl (SHELL_PATH, "sh", "-c", cmd_str.c_str (), static_cast<void *> (0)); panic_impossible ();