Diffstat (limited to 'noncore/apps/opie-console/MyPty.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/MyPty.cpp | 10 |
1 files changed, 7 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 @@ -113,13 +113,15 @@ void MyPty::donePty() ::close(m_fd); if (m_cpid) { qWarning("killing!!!"); kill(m_cpid, SIGHUP); - waitpid(m_cpid, &status, 0); + //waitpid(m_cpid, &status, 0); + delete m_sn_e; + m_sn_e = 0l; } m_cpid = 0; // emit done(status); } @@ -183,15 +185,16 @@ int MyPty::run(const char* cmd, QStrList &, const char*, int) donePty(); exit(-1); } // parent - continue as a widget 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())); return 0; } int MyPty::openPty() { @@ -229,12 +232,13 @@ int MyPty::openPty() /*! Create an instance. */ MyPty::MyPty(const Profile&) : m_cpid(0) { + m_sn_e = 0l; m_fd = openPty(); ProcCtl* ctl = ProcCtl::self(); } /*! Destructor. |