|| ||Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org> |
|| ||containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org |
|| ||[RFC] checkpoint/restart of PTYs |
|| ||Tue, 18 Aug 2009 20:42:26 -0400|
|| ||Article, Thread
This short series adds support for checkpoint and restart of PTYs. It
is mildly tested on top of ckpt-v17-dev (with test/pty from user-cr).
I'm not an expert on PTYs, TTYs, line disciplines and the like,
comments are mostly welcome:
* Only handles PTYs related to open files (no signal->...)
* What (additional) values we need to sanitize on restart ?
* What additional locking should be in place ? (especially checkpoint)
* Need to save/restore echo buffer (and position) ?
* /dev/ptmx and /dev/pts/... paths are currently hardcoded
* For restart without restoring PIDs, need to ensure the session and
pgrp are either -1 (none) or limited to a PID value that belongs to
the restarted subtree.
* For restart with restoring PIDs, need to create on-the-fly session
and/or pgrp PIDs that do not exist (e.g. of a dead process). This is
also necessary to correctly restore pgrp, regardless of PTYs.
* Other security concerns ? ...
* and probably more :p