Package org.eclipse.cdt.utils.pty
Class PersistentPTY
- java.lang.Object
-
- org.eclipse.cdt.utils.pty.PTY
-
- org.eclipse.cdt.utils.pty.PersistentPTY
-
public class PersistentPTY extends PTY
A type of PTY that is persistent. This means that closing its streams (e.g., once the connection to the process is lost) will not close the PTY or the streams; instead, they will remain open to be used again by reconnecting to the streams.closeStreams()
must be called to properly cleanup the streams once the PersistentPTY is known not be needed anymore.- Since:
- 5.10
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.cdt.utils.pty.PTY
PTY.MasterFD, PTY.Mode
-
-
Constructor Summary
Constructors Constructor Description PersistentPTY()
PersistentPTY(PTY.Mode mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeStreams()
This method must be called once the PersistentPTY is no longer needed, so that its streams can be closed.PTYInputStream
getInputStream()
PTYOutputStream
getOutputStream()
-
Methods inherited from class org.eclipse.cdt.utils.pty.PTY
exec_pty, getMasterFD, getSlaveName, isConsole, isSupported, isSupported, setTerminalSize, validateSlaveName, waitFor
-
-
-
-
Constructor Detail
-
PersistentPTY
public PersistentPTY() throws IOException
- Throws:
IOException
-
PersistentPTY
public PersistentPTY(PTY.Mode mode) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getInputStream
public PTYInputStream getInputStream()
- Overrides:
getInputStream
in classPTY
-
getOutputStream
public PTYOutputStream getOutputStream()
- Overrides:
getOutputStream
in classPTY
-
closeStreams
public void closeStreams() throws IOException
This method must be called once the PersistentPTY is no longer needed, so that its streams can be closed.- Throws:
IOException
-
-