author | harlekin <harlekin> | 2002-10-25 18:57:47 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-25 18:57:47 (UTC) |
commit | 1d3135677f1f49b9cc87ebf01f1c4eaab3c450f4 (patch) (side-by-side diff) | |
tree | 63599d704e4f522393a613692369ff9c4a554eef /noncore | |
parent | 4151cc12a6c37cbec4bb6883204703eec2fb8648 (diff) | |
download | opie-1d3135677f1f49b9cc87ebf01f1c4eaab3c450f4.zip opie-1d3135677f1f49b9cc87ebf01f1c4eaab3c450f4.tar.gz opie-1d3135677f1f49b9cc87ebf01f1c4eaab3c450f4.tar.bz2 |
is there is a real bash installed, take that instead of sh
-rw-r--r-- | noncore/apps/opie-console/MyPty.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp index 984e347..2570826 100644 --- a/noncore/apps/opie-console/MyPty.cpp +++ b/noncore/apps/opie-console/MyPty.cpp @@ -58,24 +58,25 @@ Another technic are UNIX 98 PTY's. These are supported also, and prefered over the (obsolete) predecessor. There's a sinister ioctl(2), signal(2) and job control stuff nessesary to make everything work as it should. */ #include <qapplication.h> #include <qsocketnotifier.h> #include <qstring.h> +#include <qfile.h> #include <stdlib.h> #include <stdio.h> #include <signal.h> #include <fcntl.h> #include <unistd.h> #include <termios.h> #include <sys/types.h> #include <sys/ioctl.h> #include <sys/wait.h> #ifdef HAVE_OPENPTY @@ -133,24 +134,29 @@ const char* MyPty::deviceName() return m_ttynam; } void MyPty::error() { // This is code from the Qt DumbTerminal example donePty(); } void MyPty::start() { char* cmd = "/bin/sh"; + + if ( QFile::exists( "/bin/bash" ) ) { + char* cmd = "/bin/bash"; + } + QStrList lis; int r =run(cmd, lis, 0, 0); r = r; } /*! start the client program. */ int MyPty::run(const char* cmd, QStrList &, const char*, int) { // This is code from the Qt DumbTerminal example m_cpid = fork(); |