author | mickeyl <mickeyl> | 2003-01-21 00:37:32 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-01-21 00:37:32 (UTC) |
commit | 2f708339e301f28aadc622f4d58a2d22e0b598fb (patch) (side-by-side diff) | |
tree | 58cc0564a3e888acdcf5868ca48d21ef8f82ccec /noncore/apps/opie-console/MyPty.cpp | |
parent | c5c75d4622f9c7d6aa1a8fd2ce3aed415032d932 (diff) | |
download | opie-2f708339e301f28aadc622f4d58a2d22e0b598fb.zip opie-2f708339e301f28aadc622f4d58a2d22e0b598fb.tar.gz opie-2f708339e301f28aadc622f4d58a2d22e0b598fb.tar.bz2 |
fixed a lot of errors and sloppyness to make it compile again...
Diffstat (limited to 'noncore/apps/opie-console/MyPty.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/MyPty.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp index 23d4966..b2f6a74 100644 --- a/noncore/apps/opie-console/MyPty.cpp +++ b/noncore/apps/opie-console/MyPty.cpp @@ -199,28 +199,28 @@ int MyPty::run(const char* cmd, QStrList &, const char*, int) connect(m_sn_e,SIGNAL(activated(int)),this,SLOT(error())); return 0; } int MyPty::openPty() { // This is code from the Qt DumbTerminal example int ptyfd = -1; #ifdef HAVE_OPENPTY int ttyfd; - if ( openpty(&ptyfd,&ttyfd,ttynam,0,0) ) + if ( openpty(&ptyfd,&ttyfd,m_ttynam,0,0) ) ptyfd = -1; else - close(ttyfd); // we open the ttynam ourselves. + ::close(ttyfd); // we open the ttynam ourselves. #else for (const char* c0 = "pqrstuvwxyzabcde"; ptyfd < 0 && *c0 != 0; c0++) { for (const char* c1 = "0123456789abcdef"; ptyfd < 0 && *c1 != 0; c1++) { sprintf(m_ptynam,"/dev/pty%c%c",*c0,*c1); sprintf(m_ttynam,"/dev/tty%c%c",*c0,*c1); if ((ptyfd = ::open(m_ptynam,O_RDWR)) >= 0) { if (geteuid() != 0 && !access(m_ttynam,R_OK|W_OK) == 0) { ::close(ptyfd); ptyfd = -1; } } } |