[PATCH 1/3] with-tty: reject netbsd for now (upstream issue)

0 views
Skip to first unread message

Rob Browning

unread,
Dec 23, 2025, 2:14:36 PM (3 days ago) Dec 23
to bup-...@googlegroups.com
Exit 2 immediately on netbsd for now because script is broken for our
purposes (was hanging) due to https://gnats.netbsd.org/56254

Thanks to Greg Troxel for finding and reporting the problem.

Signed-off-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---
dev/with-tty | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dev/with-tty b/dev/with-tty
index c65aa1d4..7f3de35f 100755
--- a/dev/with-tty
+++ b/dev/with-tty
@@ -7,11 +7,15 @@ set -ueo pipefail
usage() { echo 'Usage: with-tty command [arg ...]'; }
misuse() { usage 1>&2; exit 2; }

+case "$OSTYPE" in
+ netbsd) exit 2 ;; # https://gnats.netbsd.org/56254
+esac
+
if script -qec true /dev/null; then
- # linux flavor
+ # at least linux and netbsd
script -qec "$(printf ' %q' "$@")" /dev/null
elif script -q /dev/null true; then
- # bsd flavor
+ # at least freebsd
script -q /dev/null "$@"
else
rc=0
--
2.47.3

Reply all
Reply to author
Forward
0 new messages