From owner-svn-src-all@FreeBSD.ORG Sun Aug 3 05:02:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC95FD91; Sun, 3 Aug 2014 05:02:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8B962A6C; Sun, 3 Aug 2014 05:02:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s73520l6099024; Sun, 3 Aug 2014 05:02:00 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7352015099023; Sun, 3 Aug 2014 05:02:00 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201408030502.s7352015099023@svn.freebsd.org> From: Devin Teske Date: Sun, 3 Aug 2014 05:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269460 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2014 05:02:00 -0000 Author: dteske Date: Sun Aug 3 05:02:00 2014 New Revision: 269460 URL: http://svnweb.freebsd.org/changeset/base/269460 Log: Add required `exec' before Xdialog(1) invocation for the case where we expect (require) data on stdin. The effect of this is that, when backgrounded, $! returns the pid of an Xdialog(1) instance instead of an sh(1) instance -- the difference being a later kill of $! will reach the Xdialog(1) instance whereas without the exec the kill succeeds on the sh(1) instance leaving Xdialog(1) open. Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Sun Aug 3 05:00:43 2014 (r269459) +++ head/usr.sbin/bsdconfig/share/dialog.subr Sun Aug 3 05:02:00 2014 (r269460) @@ -1557,12 +1557,22 @@ f_dialog_info() # EOF. This implies that you must execute this either as an rvalue to a pipe, # lvalue to indirection or in a sub-shell that provides data on stdin. # +# To open an Xdialog(1) infobox that does not disappear until expeclitly dis- +# missed, use the following: +# +# f_xdialog_info "$info_text" < /dev/tty & +# pid=$! +# # Perform some lengthy actions +# kill $pid +# +# NB: Check $USE_XDIALOG if you need to support both dialog(1) and Xdialog(1). +# f_xdialog_info() { local info_text="$*" height width f_dialog_infobox_size height width \ "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$info_text" - $DIALOG \ + exec $DIALOG \ --title "$DIALOG_TITLE" \ --backtitle "$DIALOG_BACKTITLE" \ --no-close --no-buttons \