mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 18:25:14 +00:00
When we are restoring in new pidns we specifically do setsid() from criu-ns init so that sids of restored tasks are non-zero in this pidns and on next dump CRIU would not have problems with zero sids, see [1]. But after this CRIU tries to inherit and setup a tty for the restored process, and it fails to set it's process group via TIOCSPGRP to be a foreground group for it's tty, because tty already is a controlling tty for other session (which we had before setsid). So to make it restore we need to reset tty to be a controlling tty of criu-ns init via TIOCSCTTY before calling criu. Else when restoring first time via criu-ns (from criu-ns dump) we get: Error (criu/tty.c:689): tty: Failed to set group 40816 on 0: Inappropriate ioctl for device https://github.com/checkpoint-restore/criu/issues/232 [1] v2: add why and what comment in code, set controlling tty only for --shell-job and fail if stdin is not a tty. Fixes: #1893 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> |
||
|---|---|---|
| .. | ||
| build | ||
| ci | ||
| nmk | ||
| crit-setup.py | ||
| criu-ns | ||
| fake-restore.sh | ||
| feature-tests.mak | ||
| fetch-clang-format.sh | ||
| flake8.cfg | ||
| install-criu-image-streamer.sh | ||
| install-debian-pkgs.sh | ||
| magic-gen.py | ||
| protobuf-gen.sh | ||
| systemd-autofs-restart.sh | ||
| tmp-files.sh | ||