shared/shell: don't hook io_hup on non-interactive
authorStimim Chen <stimim@google.com>
Wed, 27 May 2020 05:02:28 +0000 (13:02 +0800)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:49 +0000 (14:30 +0530)
commit01d0d8fc6a94c2882de758167555f7e29b5741b0
tree16fb8d717a178935e47607a5a15f2767810b48bb
parent110c4061960df54dc9de61d7013f01a678f84d4a
shared/shell: don't hook io_hup on non-interactive

When we are in non-interactive mode (data.mode == 1), we should not
terminate the mainloop when stdin is disconnected.

For example, in bash, the following command would terminate immediately
without any output.

  : | btmgmt info

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/shared/shell.c