A PTYTask launches a BSD process in a pseudo-terminal session, and mediates the I/O between the child process and the process that spawned it. While PTYTask can be thought of as like an NSTask, it does not use NSTask to do its work. Its major difference from NSTask is that clients communicate with the child process through PTYTask itself, and not through ancillary NSFileHandles. PTYTask also provides for terminal-service signals to the pseudo-tty.
The methods needed to configure a PTYTask and launch the subprocess are to be found in the main interface to the class.
Terminal-service tasks, such as changing the size of the "screen" or stalling input, are covered in the terminalTasks category.
Input and events are handled by a delegate object, which should implement the ptyTaskDelegate informal protocol. The streamTasks category covers the methods for getting bytes into and out of the subprocess.
Also: PTYTask forwards all unrecognized methods to the NSFileHandle that services I/O to the task.
Definition in file PTYTask.h.
#import <Foundation/Foundation.h>
#import <sys/ioctl.h>
Include dependency graph for PTYTask.h:

Go to the source code of this file.
Data Structures | |
| class | PTYTask |
| Configure and launch pseudo-terminal subprocesses. More... | |
| class | PTYTask(terminalTasks) |
| Terminal-management methods for PTYTask This category encompasses methods of PTYTask that deal with the properties of its pseudo-terminal. More... | |
| class | PTYTask(streamTasks) |
| I/O stream methods for PTYTask The methods in this category do the basic insertion and retrieval of data between the PTYTask and its client. More... | |
| category | NSObject(ptyTaskDelegate) |
| Methods for data-handling and other events sent to PTYTask delegates. More... | |
1.4.4