Hi all,

stty from GNU coreutils returns 1 on error:

localhost:~$ stty -F /dev/tty1 rows 999
stty: /dev/tty1: Invalid argument
localhost:~$ echo $?
1

While busybox stty returns 0:

localhost:~$ busybox stty -F /dev/tty1 rows 999
stty: /dev/tty1: Invalid argument
localhost:~$ echo $?
0

Suggested patch:
diff -u a/coreutils/stty.c b/coreutils/stty.c
--- a/coreutils/stty.c  2019-06-10 10:50:53.000000000 +0000
+++ b/coreutils/stty.c  2020-03-03 22:47:15.234204337 +0000
@@ -886,7 +886,7 @@
 
        if (ioctl(STDIN_FILENO, TIOCSWINSZ, (char *) &win))
 bail:
-               perror_on_device("%s");
+               perror_on_device_and_die("%s");
 }
 #endif
 
--

Kind regards,
 Ferenc Bakonyi 
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to