From 9f9ec7a6a9588675060d31d508a31d1003335f48 Mon Sep 17 00:00:00 2001 From: "chess.griffin" Date: Sun, 2 Aug 2009 17:38:25 +0000 Subject: [PATCH] change the dialog refresh workaround function so it simply sets TERM=xterm-color, which seems to fix most issues; any other issues will go in a yet to be created doc KNOWN_ISSUES; thanks to Mauro for this fix --- src/usr/sbin/sbopkg | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index 60582da..8ae49aa 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -40,24 +40,11 @@ dialog_refresh_workaround() { # Dialog has refresh problems on some terminals (currently known are some # rxvt-based terminals and screen sessions), preventing correct dialogs - # rendering. This function enables a workaround, consisting of a - # background task sending SIGWINCH to any new dialog instance. Despite - # being probably harmless on "good" terminals, this function should really - # be called only on problematic ones. + # rendering. + # It turns out that forcing TERM=xterm-color "fixes" at least most of the + # issues, so work around them this way. - DIALOG_REFRESH_WORKAROUND_SBOPKG_PID=$$ - - ( # The background task runs in a separate shell - OLDDIALOGS= - while [[ $(ps h --pid $DIALOG_REFRESH_WORKAROUND_SBOPKG_PID) ]]; do - DIALOGS=$(pgrep -x "^dialog$") - if [[ "$DIALOGS" != "$OLDDIALOGS" ]]; then - [[ "$DIALOGS" ]] && kill -WINCH $DIALOGS - OLDDIALOGS="$DIALOGS" - fi - sleep 0.3 - done - ) & + export TERM=xterm-color } crunch() {