Mercurial > hg > octave-lyh
changeset 15640:d649d67078e9
Using KPty to open a pty.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Tue, 24 Jan 2012 21:26:45 +0100 |
parents | 0fad530cb34e |
children | b8d787001038 |
files | libqterminal/QTerminal.cpp |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libqterminal/QTerminal.cpp +++ b/libqterminal/QTerminal.cpp @@ -18,7 +18,7 @@ #include "QTerminal.h" -#include "pty.h" +#include "kpty.h" QTerminal::QTerminal(QWidget *parent) : QWidget(parent) { @@ -33,9 +33,10 @@ void QTerminal::init() { - int fdm; - int fds; - openpty (&fdm, &fds, 0, 0, 0); + KPty *kpty = new KPty(); + kpty->open(); + int fdm = kpty->masterFd(); + int fds = kpty->slaveFd(); dup2 (fds, 0); dup2 (fds, 1);