-rw-r--r-- | noncore/apps/opie-console/MyPty.cpp | 10 | ||||
-rw-r--r-- | noncore/apps/opie-console/MyPty.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp index cacb4ce..ae01392 100644 --- a/noncore/apps/opie-console/MyPty.cpp +++ b/noncore/apps/opie-console/MyPty.cpp @@ -118,3 +118,5 @@ void MyPty::donePty() kill(m_cpid, SIGHUP); - waitpid(m_cpid, &status, 0); + //waitpid(m_cpid, &status, 0); + delete m_sn_e; + m_sn_e = 0l; } @@ -188,5 +190,6 @@ int MyPty::run(const char* cmd, QStrList &, const char*, int) QSocketNotifier* sn_r = new QSocketNotifier(m_fd,QSocketNotifier::Read,this); -// QSocketNotifier* sn_e = new QSocketNotifier(m_fd,QSocketNotifier::Exception,this); + delete m_sn_e; + m_sn_e = new QSocketNotifier(m_fd,QSocketNotifier::Exception,this); connect(sn_r,SIGNAL(activated(int)),this,SLOT(readPty())); -// connect(sn_e,SIGNAL(activated(int)),this,SLOT(error())); + connect(m_sn_e,SIGNAL(activated(int)),this,SLOT(error())); @@ -234,2 +237,3 @@ MyPty::MyPty(const Profile&) : m_cpid(0) { + m_sn_e = 0l; m_fd = openPty(); diff --git a/noncore/apps/opie-console/MyPty.h b/noncore/apps/opie-console/MyPty.h index 9231a8a..3166fa0 100644 --- a/noncore/apps/opie-console/MyPty.h +++ b/noncore/apps/opie-console/MyPty.h @@ -30,2 +30,3 @@ class Profile; +class QSocketNotifier; class MyPty : public IOLayer @@ -92,2 +93,3 @@ private: int m_cpid; + QSocketNotifier* m_sn_e; }; |