Changes

Jump to navigation Jump to search
1,119 bytes added ,  15:39, 8 September 2016
Line 26: Line 26:     
'''current''' terminal is rather an abstraction over real terminal an application uses. Upon its opening the kernel simply provides back the reference to the real one thus the same way as for '''console''' its restore is just <code>open(/dev/tty)</code> with one exception - it must be restored last, ie after all other terminals are restored.
 
'''current''' terminal is rather an abstraction over real terminal an application uses. Upon its opening the kernel simply provides back the reference to the real one thus the same way as for '''console''' its restore is just <code>open(/dev/tty)</code> with one exception - it must be restored last, ie after all other terminals are restored.
 +
 +
=== Virtual terminal ===
 +
 +
'''vt''' stands for ''ttyN'' devices for which restore we simply do <code>open(/dev/ttyN)</code>, where N is a number.
 +
 +
=== External terminal ===
 +
 +
'''external''' terminals stands for cases when file descriptors known to be changing between checkpoint/restore cycles and passed from command line options, see [[Inheriting_FDs_on_restore]] for details. For this kind of terminals we are relying the file descriptors already opened and passed available so on restore we simply reuse them.
 +
 +
=== Serial terminal ===
 +
 +
'''serial''' terminals are supported for debug purpose mostly, in particular some developers pass through into virtual machine with this terminals. Its restore as simple as plain <code>open()</code> call.
 +
 +
=== Unix98 terminal ===
 +
 +
'''pty''' terminals are most commonly used over all other kinds. The '''pty''' represent a pair of peers: upon <code>open(/dev/ptmx)</code> the kernel automatically create <code>/dev/pts/N</code> slave peer, where N is a numeric index of the pair opened. Thus on restore we simply need ''ptmx'' device and give process master and slave descriptors.

Navigation menu