summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/MyPty.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/MyPty.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/MyPty.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp
index 16bb5ff..984e347 100644
--- a/noncore/apps/opie-console/MyPty.cpp
+++ b/noncore/apps/opie-console/MyPty.cpp
@@ -101,25 +101,24 @@ void MyPty::setSize(int lines, int columns)
101 qWarning("setting size"); 101 qWarning("setting size");
102 struct winsize wsize; 102 struct winsize wsize;
103 wsize.ws_row = (unsigned short)lines; 103 wsize.ws_row = (unsigned short)lines;
104 wsize.ws_col = (unsigned short)columns; 104 wsize.ws_col = (unsigned short)columns;
105 if(m_fd < 0) return; 105 if(m_fd < 0) return;
106 ioctl(m_fd,TIOCSWINSZ,(char *)&wsize); 106 ioctl(m_fd,TIOCSWINSZ,(char *)&wsize);
107} 107}
108 108
109 109
110void MyPty::donePty() 110void MyPty::donePty()
111{ 111{
112 // This is code from the Qt DumbTerminal example 112 // This is code from the Qt DumbTerminal example
113 int status = 0;
114 113
115 ::close(m_fd); 114 ::close(m_fd);
116 115
117 if (m_cpid) { 116 if (m_cpid) {
118 kill(m_cpid, SIGHUP); 117 kill(m_cpid, SIGHUP);
119 //waitpid(m_cpid, &status, 0); 118 //waitpid(m_cpid, &status, 0);
120 delete m_sn_e; 119 delete m_sn_e;
121 delete m_sn_r; 120 delete m_sn_r;
122 m_sn_e = 0l; 121 m_sn_e = 0l;
123 m_sn_r = 0l; 122 m_sn_r = 0l;
124 } 123 }
125 124
@@ -248,24 +247,25 @@ MyPty::MyPty(const Profile& prof) : m_cpid(0)
248 break; 247 break;
249 case Profile::Linux: 248 case Profile::Linux:
250 m_term = "linux"; 249 m_term = "linux";
251 break; 250 break;
252 case Profile::XTerm: 251 case Profile::XTerm:
253 m_term = "xterm"; 252 m_term = "xterm";
254 break; 253 break;
255 } 254 }
256 m_sn_e = 0l; 255 m_sn_e = 0l;
257 m_sn_r = 0l; 256 m_sn_r = 0l;
258 m_fd = openPty(); 257 m_fd = openPty();
259 ProcCtl* ctl = ProcCtl::self(); 258 ProcCtl* ctl = ProcCtl::self();
259 Q_UNUSED(ctl);
260} 260}
261 261
262/*! 262/*!
263 Destructor. 263 Destructor.
264 Note that the related client program is not killed 264 Note that the related client program is not killed
265 (yet) when a instance is deleted. 265 (yet) when a instance is deleted.
266*/ 266*/
267MyPty::~MyPty() 267MyPty::~MyPty()
268{ 268{
269 donePty(); 269 donePty();
270} 270}
271QString MyPty::identifier()const { 271QString MyPty::identifier()const {