I have GNU screen running in LXC container, thus having private PID namespace. I'm trying to attach to that screen from "outside" the namespace. Both screens share filesystem, thus are able to access same socket. "External" screen -ls
lists session properly, but attempt to attach with screen -x
fails, with "Attach attempt with bad pid(XXX)!" message on original screen running inside lxc container. "External" attacher screen waits for 15 seconds and exits with "Suddenly the Dungeon collapses!! - You die..." message and 1 as errorcode.
"External" attacher is able to remotely detach screen with screen -d
but still have 15sec timeout and 'Collapse' error. "External" attacher is able to execute commands with screen -X
with no problems. However screen -Q
passes command into running screen then hang and wait for Ctrl+C, leaving dead socket suffixed -queryA
in /var/run/screen/
.
That is natural that "internal" screen cannot see "external" one as they doesn't share pid namespace. Is that possible to turn off the PID check in screen? Why do we need that check while attaching to screen anyway? Isn't access to socket enough for screens to communicate properly with each other?
Update: I've submitted request to screen-devel maillist via bug report #35324.
screen
explicitly rejects PID 1 for unknown reasons.