-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 | |||
@@ -117,5 +117,7 @@ void MyPty::donePty() | |||
117 | qWarning("killing!!!"); | 117 | qWarning("killing!!!"); |
118 | kill(m_cpid, SIGHUP); | 118 | kill(m_cpid, SIGHUP); |
119 | waitpid(m_cpid, &status, 0); | 119 | //waitpid(m_cpid, &status, 0); |
120 | delete m_sn_e; | ||
121 | m_sn_e = 0l; | ||
120 | } | 122 | } |
121 | 123 | ||
@@ -187,7 +189,8 @@ int MyPty::run(const char* cmd, QStrList &, const char*, int) | |||
187 | // parent - continue as a widget | 189 | // parent - continue as a widget |
188 | QSocketNotifier* sn_r = new QSocketNotifier(m_fd,QSocketNotifier::Read,this); | 190 | QSocketNotifier* sn_r = new QSocketNotifier(m_fd,QSocketNotifier::Read,this); |
189 | // QSocketNotifier* sn_e = new QSocketNotifier(m_fd,QSocketNotifier::Exception,this); | 191 | delete m_sn_e; |
192 | m_sn_e = new QSocketNotifier(m_fd,QSocketNotifier::Exception,this); | ||
190 | connect(sn_r,SIGNAL(activated(int)),this,SLOT(readPty())); | 193 | connect(sn_r,SIGNAL(activated(int)),this,SLOT(readPty())); |
191 | // connect(sn_e,SIGNAL(activated(int)),this,SLOT(error())); | 194 | connect(m_sn_e,SIGNAL(activated(int)),this,SLOT(error())); |
192 | 195 | ||
193 | return 0; | 196 | return 0; |
@@ -233,4 +236,5 @@ int MyPty::openPty() | |||
233 | MyPty::MyPty(const Profile&) : m_cpid(0) | 236 | MyPty::MyPty(const Profile&) : m_cpid(0) |
234 | { | 237 | { |
238 | m_sn_e = 0l; | ||
235 | m_fd = openPty(); | 239 | m_fd = openPty(); |
236 | ProcCtl* ctl = ProcCtl::self(); | 240 | ProcCtl* ctl = ProcCtl::self(); |
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 | |||
@@ -29,4 +29,5 @@ | |||
29 | 29 | ||
30 | class Profile; | 30 | class Profile; |
31 | class QSocketNotifier; | ||
31 | class MyPty : public IOLayer | 32 | class MyPty : public IOLayer |
32 | { | 33 | { |
@@ -91,4 +92,5 @@ private: | |||
91 | int m_fd; | 92 | int m_fd; |
92 | int m_cpid; | 93 | int m_cpid; |
94 | QSocketNotifier* m_sn_e; | ||
93 | }; | 95 | }; |
94 | 96 | ||