Merge pull request #39 from F1ash/master
add method for get pty slave fd;
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user