<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - systemd-nspawn: return key does not work in some programs"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90788">90788</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>systemd-nspawn: return key does not work in some programs
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>tobias.hunger@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>I have a container with a user set up to run the fish shell.
"machinectl login container" does give me a login prompt and starts fish.
Unfortunately the return key does not do anything in that setup, but Ctrl-J
does work to trigger commands.
Changing the shell to bash helps somewhat: That shell recognizes the return key
as expected. Starting fish from bash does end up with a broken return key
again. A bash started from fish does work.
Other programs are effected as well: Sudo won't accept the return key in the
password prompt, git has similar problems whenever asking something and I am
sure other programs display similar problems. Ctrl-J works in all places I ran
into.
When I use "nsenter <container-leader-PID> --mount --uts --ipc --net" fish as
well as sudo and git work as expected.
Any ideas?
This is stty -a from outside the container:
speed 38400 baud; rows 46; columns 114; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?;
eol2 = M-^?; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl
-ixon -ixoff -iuclc ixany imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt echoctl echoke
This is stty -a inside the nspawn-container:
speed 38400 baud; rows 46; columns 114; line = 0;
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;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
-ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt -echoctl echoke
The difference is AFAICT:
eol, eol2, -icrnl -ixany -imaxbel iutf8 -iexten -echoctl
stty -F /dev/ptmx is identical inside and outside of the container --
but I am not sure whether that is what you were asking in the second
part of your reply.
I tried running "stty eol ^J -F /dev/pts/0" inside the container and
got a SIGSEGV. It works outside the container.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>