[CRIU] [PATCH 0/6] tty: Impletemt current terminal support, v3

Saied Kazemi saied at google.com
Tue Mar 24 10:17:21 PDT 2015


Hi Cyrill,

As you may recall, the standard file descriptors of containers created by
nsinit/libcontainer turned out to be pipes which required --inherit-fd.

Trying the tty-5 branch of git://github.com/cyrillos/crtools.git to dump
and restore an interactive shell outside a container kind of works.  I say
kind of because the restored shell is stopped after each external command
(e.g., tty, hostname).  Please see below.

Maybe it's something obvious but, sorry, I haven't had time to look into
this.

--Saied


[Terminal A]
$ uname -a
Linux saied-docker 3.13.11.8 #1 SMP Mon Nov 17 15:15:11 PST 2014 x86_64
x86_64 x86_64 GNU/Linux
$ tty
/dev/pts/2
$ pwd
/home/saied/work/crtools.cyrill
$ sh -i
$ FOO=bar
$ echo $FOO
bar
$

[Terminal B]
$ ps -efl | grep -w sh
0 S saied     8106  7922  0  80   0 -  1110 n_tty_ 10:04 pts/2    00:00:00
sh -i
0 S saied     9370  7415  0  80   0 -  2935 pipe_w 10:07 pts/3    00:00:00
grep --color=auto -w sh
$ sudo ./criu dump -D /tmp/criu_img -o dump.log -v4 -j -t 8106 && echo OK
OK
$

[Terminal A]
$ Killed
$ sudo ./criu restore -D /tmp/criu_img -o restore.log -v4 -j

$ echo $FOO
bar
$ tty
/dev/pts/2
$
[2]+  Stopped                 sudo ./criu restore -D /tmp/criu_img -o
restore.log -v4 -j
$ fg
sudo ./criu restore -D /tmp/criu_img -o restore.log -v4 -j

$ pwd
/home/saied/work/crtools.cyrill
$ hostname
saied-docker
$
[2]+  Stopped                 sudo ./criu restore -D /tmp/criu_img -o
restore.log -v4 -j
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150324/7d02802b/attachment.html>


More information about the CRIU mailing list