skip book previous and next navigation links
go up to top of book: HP OpenVMS I/O User's Reference Manual HP OpenVMS I/O User's Reference Manual
go to beginning of chapter: Pseudoterminal Driver Pseudoterminal Driver
 
go to next page: Pseudoterminal Driver FeaturesPseudoterminal Driver Features
end of book navigation links

Pseudoterminal Operations  



This section contains information on the following pseudoterminal operations:

Creating a Pseudoterminal  

To create a pseudoterminal, use the PTD$CREATE routine described in Control Connection Routines. When a pseudoterminal is created, it inherits the current system terminal default attributes unless you specify an alternate set of characteristics. In either case, you cannot use PTD$CREATE to alter the following startup attributes:

When you create a pseudoterminal, you can specify a repeating asynchronous system trap (AST) to be delivered when the terminal connection is freed. This AST can be supplied only when the pseudoterminal is created, and it cannot be deleted. A terminal is freed when a process logs out or deassigns the last channel to the device. The AST allows the control program to determine whether or not a user of a pseudoterminal is using it. At this point, the control program can reuse or delete the pseudoterminal by deassigning the control channel.

Canceling a Request  

To cancel a queued control connection request, the control program uses the PTD$CANCEL routine. This routine enables the pseudoterminal driver to differentiate between control requests and terminal requests that are being canceled. This routine cannot be used to flush event notification ASTs.

Deleting a Pseudoterminal  

To delete the pseudoterminal, the control program uses the PTD$DELETE routine. When a pseudoterminal is deleted, any process that is using the pseudoterminal (except the control process) is disconnected. If you have the TT2$M_DISCONNECT bit set in the default terminal characteristics parameter (TTY_DEFCHAR2) and virtual terminals have been enabled (see SET HOST Facility and Output Buffering), you get a virtual terminal upon logging in to a pseudoterminal. In this case, the process is not logged out, but the virtual terminal is disconnected from the pseudoterminal.

The PTD$DELETE request causes any pending I/O for the control program to be aborted. It deletes any queued event notification ASTs and returns the I/O buffers to the application. It also causes the pseudoterminal unit control block (UCB) to be deleted once the reference count returns to zero.


NoteIf an application exits without calling PTD$DELETE, the pseudoterminal is still deleted.


 
go to next page: Pseudoterminal Driver FeaturesPseudoterminal Driver Features