Properly sanitize --menu results (guards against Gtk library warnings from
X11 side of things from bleeding into Xdialog(1) stderr output). It should be duely noted that such errors are not a by-product of anything in the Xdialog(1) utility or API, but optional libraries that it can link against (such as Gtk1 versus Gtk2; if you compile xdialog from ports against Gtk2 AND misconfigure your fonts or generally make Gtk2 unhappy, these warning messages can bleed into the captured stderr -- that is we we sanitize!).
This commit is contained in:
parent
76c853ae67
commit
f780b9f529
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249955
@ -645,7 +645,12 @@ f_device_menu()
|
||||
|
||||
[ "$errexit" ] && set -e
|
||||
|
||||
[ $retval -eq 0 ] && echo "$mtag" >&2
|
||||
if [ $retval -eq 0 ]; then
|
||||
# Clean up the output of [X]dialog(1) and return it
|
||||
setvar DIALOG_MENU_$$ "$mtag"
|
||||
mtag=$( f_dialog_menutag )
|
||||
echo "$mtag" >&2
|
||||
fi
|
||||
|
||||
return $retval
|
||||
}
|
||||
|
@ -1399,6 +1399,8 @@ f_device_dialog_tcp()
|
||||
2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
|
||||
)
|
||||
local retval=$?
|
||||
setvar DIALOG_MENU_$$ "$cp"
|
||||
cp=$( f_dialog_menutag )
|
||||
f_dprintf "retval=%u mtag=[%s]" $retval "$cp"
|
||||
|
||||
if [ $retval -eq 2 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user