[RFC] checkpoint/restart of PTYs

Oren Laadan orenl at librato.com
Tue Aug 18 17:42:26 PDT 2009


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

Oren.




More information about the Containers mailing list