<div dir="ltr"><div>If I run stty -a under lxc-execute without a contained root filesystem, I get one set of terminal settings. If I bind-mount the host's root filesystem and /dev and use that as the container's root fs, I get a different set of terminal settings. The differences in the two sets of settings are that with the contained root fs, the stty options icrnl, ixon, isig, icanon, and echo are all off. This makes an interactive shell not work very well. :-) Obviously I can run stty to change the terminal settings, but I am wondering what controls the pty terminate settings when lxc creates a contained root filesystem vs. when it does not.</div>

<div><br></div><div>Example on Ubuntu 12.04:</div><div><br></div><div>No contained root filesystem:</div><div><br></div><div><div><font face="courier new, monospace"># cat test.cfg</font></div><div><font face="courier new, monospace">lxc.utsname = mytest</font></div>

<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"># lxc-execute -n test -f test.cfg  -- stty -a</font></div><div><font face="courier new, monospace">speed 38400 baud; rows 52; columns 204; line = 0;</font></div>

<div><font face="courier new, monospace">intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;</font></div>

<div><font face="courier new, monospace">-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts</font></div><div><font face="courier new, monospace">-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8</font></div>

<div><font face="courier new, monospace">opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0</font></div><div><font face="courier new, monospace">isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke</font></div>

</div><div><br></div><div>Contained root filesystem:</div><div><br></div><div><font face="courier new, monospace"># mount --bind / /var/lib/lxc/container/testrootfs</font></div><div><font face="courier new, monospace"><br>

</font></div><div><div><font face="courier new, monospace"># cat test.cfg</font></div><div><font face="courier new, monospace">lxc.utsname = mytest</font></div><div><font face="courier new, monospace">lxc.rootfs = /var/lib/lxc/container/testrootfs</font></div>

<div><font face="courier new, monospace">lxc.mount.entry=/dev /var/lib/lxc/container/testrootfs/dev none rw,bind 0 0<br></font></div></div><div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"># lxc-execute -n test -f test.cfg  -- stty -a</font></div>

<div><font face="courier new, monospace">speed 38400 baud; rows 52; columns 204; line = 0;</font></div><div><font face="courier new, monospace">intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;</font></div>

<div><font face="courier new, monospace">-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts</font></div><div><font face="courier new, monospace">-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8</font></div>

<div><font face="courier new, monospace">opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0</font></div><div><font face="courier new, monospace">-isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke</font></div>

</div><div><br></div><div>Thanks,</div><div><br></div><div>Barry</div><div><br></div><div><br></div>-- <br>Barry Jaspan<br><font size="1"><span style="color:rgb(102,102,102)">Senior Architect | </span><a style="color:rgb(102,102,102)" href="http://acquia.com" target="_blank">Acquia</a><br style="color:rgb(102,102,102)">

<a style="color:rgb(102,102,102)" href="mailto:barry.jaspan@acquia.com" target="_blank">barry.jaspan@acquia.com</a><span style="color:rgb(102,102,102)"> | (c) 617.905.2208 | (w) 781-313-8298</span><br style="color:rgb(102,102,102)">

<br style="color:rgb(102,102,102)"><font><a href="http://www.acquia.com/dev-cloud" target="_blank">Acquia Dev Cloud: You build killer websites. We do the rest.</a><a href="http://acquia.com/dev-cloud" target="_blank"></a></font></font><br>

<a href="http://www.acquia.com/about-us/newsroom/press-releases/inc-magazine-unveils-31st-annual-list-america-s-fastest-growing" target="_blank"><span style="font-size:13px;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">Acquia</span><span style="font-size:13px;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline"> ranked #1 Software Vendor on the 2012 Inc 500</span></a><br>

<br>
</div>