bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] fix [[ -t X ]] segfault


From: Grisha Levit
Subject: [PATCH] fix [[ -t X ]] segfault
Date: Fri, 8 Sep 2023 12:36:15 -0400

Since the change that made `test -t FD' report an error for non-numeric
values of FD:

$ [[ -t X ]]
bash: [[: X: integer expected
Segmentation fault

Below patch wraps all [[ test execution in a new function that provides
a jump target and returns an exit status usable directly by the
cond_node code -- so the above now has an exit status of 2 like the test
builtin.

Attachment: 0001-fix-t-X-segfault.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]