[buildd-tools-devel] Bug#679499: Bug#679499: Bug#679499: schroot: suspend fails from chroot
Roger Leigh
rleigh at codelibre.net
Sun Oct 14 23:29:31 UTC 2012
On Mon, Oct 15, 2012 at 12:16:16AM +0100, Roger Leigh wrote:
> This is quite an interesting problem, and will need a bit more
> investigation before I find a solution.
>
> bash sets up its own process group on startup. When you call
> "suspend", it signals the whole process group to stop. But since
> schroot isn't in the same group, it's not suspended. Ideally,
> you would only run a login shell with schroot, but we're not in
> an ideal world ;)
Just as another datapoint:
Try running
ssh localhost -t bash
and then try suspend in the shell. You'll notice that it behaves
identically to schroot. The -t is to allocate a TTY, otherwise
you don't get any shell job control (or suspend).
It would be interesting to know how any other similar tools
behave. su/sudo/chroot just exec their command after setting
things up, so there isn't a parent process waiting for a child.
So it's limited to programs which fork a shell and wait for it,
like schroot and ssh.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools
`- GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800
More information about the Buildd-tools-devel
mailing list