On 2019-08-08 2:05 p.m., Bart Van Assche wrote:
> Avoid that the following error messages are reported when redirecting stdin:
>
> stty: 'standard input': Inappropriate ioctl for device
> stty: 'standard input': Inappropriate ioctl for device
>
> Cc: Logan Gunthorpe <[email protected]>
> Cc: Johannes Thumshirn <[email protected]>
> Fixes: a987b10bc179 ("nvme: Ensure all ports and subsystems are removed on
> cleanup")
> Signed-off-by: Bart Van Assche <[email protected]>
> ---
> tests/nvme/rc | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/nvme/rc b/tests/nvme/rc
> index d4e18e635dea..40f0413d32d2 100644
> --- a/tests/nvme/rc
> +++ b/tests/nvme/rc
> @@ -36,7 +36,7 @@ _cleanup_nvmet() {
> fi
>
> # Don't let successive Ctrl-Cs interrupt the cleanup processes
> - stty -isig
> + trap '' SIGINT
Did you test this? Pretty sure I tried using trap and it didn't work,
probably because it's already running inside a trapped SIGINT.
Maybe it'd be better to just ignore any errors stty produces and pipe to
/dev/null?
Logan