help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird interaction between chroot jail and shell-mode


From: Sean McAfee
Subject: Re: Weird interaction between chroot jail and shell-mode
Date: Wed, 08 Dec 2010 15:34:03 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

pjb@informatimago.com (Pascal J. Bourguignon) writes:
> Sean McAfee <eefacm@gmail.com> writes:
>> How in the world can any command produce
>> different behavior when run inside vs. outside of a chroot jail, but
>> only when run from a bash shell which itself is running inside a
>> shell-mode buffer?

> In the root jail, have you mounted /proc and /dev ?
> Without that, since the stdin stdout are not normal ptys, when you use
> M-x shell, it may try to access the device and if not found that could
> be the cause of the hang.  Perhaps.
>
> mount -t proc proc $ROOT_JAIL/proc
> mount -o bind /dev $ROOT_JAIL/dev

$ mount | grep chroot
proc on /home/smcafee/chroots/example/proc type proc (rw)
/dev on /home/smcafee/chroots/example/dev type none (rw,bind)
$ 

Originally, I had a slightly different configuration in /etc/fstab:

/proc /home/smcafee/chroots/example/proc none bind 0 0
/home /home/smcafee/chroots/example/home none bind 0 0
/var/tmp /home/smcafee/chroots/example/var/tmp none bind 0 0
/dev /home/smcafee/chroots/example/dev none bind 0 0
/dev/pts /home/smcafee/chroots/example/dev/pts none bind 0 0

But I winnowed it down to only the two mount points you mentioned, and
at each step the shell-mode shell's build still got hung up at the same
place.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]