Merge pull request #39 from F1ash/master

add method for get pty slave fd;
This commit is contained in:
Petr Vanek
2015-02-05 11:32:07 +01:00
4 changed files with 25 additions and 0 deletions
+5
View File
@@ -79,6 +79,7 @@ Session::Session(QObject* parent) :
//create teletype for I/O with shell process
_shellProcess = new Pty();
ptySlaveFd = _shellProcess->pty()->slaveFd();
//create emulation backend
_emulation = new Vt102Emulation();
@@ -939,6 +940,10 @@ int Session::processId() const
{
return _shellProcess->pid();
}
int Session::getPtySlaveFd() const
{
return ptySlaveFd;
}
SessionGroup::SessionGroup()
: _masterMode(0)
+9
View File
@@ -363,6 +363,13 @@ public:
// void cancelZModem();
// bool isZModemBusy() { return _zmodemBusy; }
/**
* Returns a pty slave file descriptor.
* This can be used for display and control
* a remote terminal.
*/
int getPtySlaveFd() const;
public slots:
/**
@@ -543,6 +550,8 @@ private:
static int lastSessionId;
int ptySlaveFd;
};
/**
+4
View File
@@ -619,3 +619,7 @@ Filter::HotSpot* QTermWidget::getHotSpotAt(int row, int column) const
return m_impl->m_terminalDisplay->filterChain()->hotSpotAt(row, column);
}
int QTermWidget::getPtySlaveFd() const
{
return m_impl->m_session->getPtySlaveFd();
}
+7
View File
@@ -165,6 +165,13 @@ public:
*/
Filter::HotSpot* getHotSpotAt(int row, int column) const;
/**
* Returns a pty slave file descriptor.
* This can be used for display and control
* a remote terminal.
*/
int getPtySlaveFd() const;
signals:
void finished();
void copyAvailable(bool);