mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Hitting CTRL-D anywhere will cause fdasd to go into an endless loop displaying the main menu over and over again. Killing fdasd (e.g. via CTR-C) is the only way out. The issue is that read_line() is just ignoring the resulting EOF condition on stdin. Subsequent invocations of read_line() will return immediately and thus cause the loop. A simple fix is to reset stdin after EOF. A caller of read_line() will see the same behavior as for EOL with no input. Signed-off-by: Viktor Mihajlovski <mihajlov@linux.ibm.com> Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>