public class NativePty
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
mfd_inp
Master INP PTY descriptor
|
protected int |
mfd_out
Master OUT PTY descriptor
|
protected int |
pid
Child process PID
|
Constructor and Description |
---|
NativePty() |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
read(int mfd_inp)
Read from master PTY descriptor.
|
protected int |
shell(java.lang.String term,
java.lang.String[] cmdLine,
int overlay)
Spawn a child shell process.
|
protected int |
waitPid(int pid)
Wait for child process to exit.
|
protected int |
write(int mfd_out,
byte[] data)
Write a byte array to master PTY.
|
protected int mfd_inp
protected int mfd_out
protected int pid
protected int shell(java.lang.String term, java.lang.String[] cmdLine, int overlay)
term
- Terminal environment TERM=vt100cmdLine
- Command line arguments.overlay
- Overlapped mode.protected int waitPid(int pid)
pid
- Child process id.protected byte[] read(int mfd_inp)
mfd_inp
- Master PTY descriptor.protected int write(int mfd_out, byte[] data)
mfd_out
- Master PTY descriptordata
- Data to write.