forked from checkpoint-restore/criu
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tty: allow to dump and restore external terminals (v2)
Now we can use the --inherit-fd option to mark external terminals on dump and to tell which file desdriptors should be used to restore these terminals. Here is an example how it works: $ setsid sleep 1000 $ ipython In [1]: import os In [2]: st = os.stat("/proc/self/fd/0") In [3]: print "tty[%x:%x]" % (st.st_rdev, st.st_dev) tty:[8800:d] $ps -C sleep PID TTY TIME CMD 4109 ? 00:00:00 sleep $ ./criu dump --external 'tty[8800:d]' -D imgs -v4 -t 4109 $ ./criu restore --inherit-fd 'fd[1]:tty[8800:d]' -D imgs -v4 v2: add missed break remove @non_file from tty_driver Signed-off-by: Andrew Vagin <[email protected]> Signed-off-by: Pavel Emelyanov <[email protected]>
- Loading branch information
Showing
5 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ enum TtyType { | |
CONSOLE = 2; | ||
VT = 3; | ||
CTTY = 4; | ||
EXT_TTY = 5; | ||
} | ||
|
||
message tty_info_entry { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters