class KPty |
|
|
Internal Provides primitives for opening & closing a pseudo TTY pair, assigning the controlling TTY, utmp registration and setting various terminal attributes. |
|
Constructor |
|
Internal |
|
Close the pty master/slave pair. |
|
Close the pty slave descriptor. When creating the pty, KPty also opens the slave and keeps it open. Consequently the master will never receive an EOF notification. Usually this is the desired behavior, as a closed pty slave can be reopened any time - unlike a pipe or socket. However, in some cases pipe-alike behavior might be desired. After this function was called, slaveFd() and setCTty() cannot be used. |
|
Creates an utmp entry for the tty. This function must be called after calling setCTty and making this pty the stdin. user - the user to be logged on remotehost - the host from which the login is coming. This is not the local host. For remote logins it should be the hostname of the client. For local logins from inside an X session it should be the name of the X display. Otherwise it should be empty. |
|
Removes the utmp entry for this tty. |
|
Returns the file descriptor of the master pty This function should be called only while the pty is open. |
|
Create a pty master/slave pair. Returns true if a pty pair was successfully opened |
|
Creates a new session and process group and makes this pty the controlling tty. |
|
Set whether the pty should echo input. Echo is on by default. If the output of automatically fed (non-interactive) PTY clients needs to be parsed, disabling echo often makes it much simpler. This function can be used only while the PTY is open.
echo - true if input should be echoed. Returns true on success, false otherwise |
|
Change the logical (screen) size of the pty. The default is 24 lines by 80 columns. This function can be used only while the PTY is open.
lines - the number of rows columns - the number of columns Returns true on success, false otherwise |
|
Returns the file descriptor of the slave pty This function should be called only while the pty slave is open. |
|
Wrapper around tcgetattr(3). This function can be used only while the PTY is open. #include <termios.h> to do anything useful with it.
ttmode - a pointer to a termios structure. Note: when declaring ttmode, termios must be used - without the '.' some version of HP-UX thinks, this declares the struct in your class, in your method. Returns true on success, false otherwise |
|
Wrapper around tcsetattr(3) with mode TCSANOW. This function can be used only while the PTY is open.
ttmode - a pointer to a termios structure. Returns true on success, false otherwise. Note that success means that at least one attribute could be set. |
|
Returns the name of the slave pty device. This function should be called only while the pty is open. |