The master driver and slave driver have the following characteristics:
Each master driver has one-to-one relationship with a slave device based on major/minor device numbers.
Only one open is allowed on a master device. Multiple opens are allowed on the slave device according to standard file mode and ownership permissions.
Each slave driver minor device has a node in the file system.
An open on a master device automatically locks out an open on the corresponding slave driver.
A slave cannot be opened unless the corresponding master is open and has unlocked the slave.
To provide a TTY interface to the user, the ldterm and ptem modules are pushed on the slave side.
A close on the master sends a hang up to the slave and renders both streams unusable, after all data have been consumed by the process on the slave side.
The last close on the slave side sends a zero-length message to the master but does not sever the connection between the master and slave drivers.