From owner-freebsd-bugs Thu Nov 22 1: 0:20 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4BB4237B41C for ; Thu, 22 Nov 2001 01:00:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAM902s11610; Thu, 22 Nov 2001 01:00:02 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id DBBA637B405 for ; Thu, 22 Nov 2001 00:53:24 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAM8rOL10679; Thu, 22 Nov 2001 00:53:24 -0800 (PST) (envelope-from nobody) Message-Id: <200111220853.fAM8rOL10679@freefall.freebsd.org> Date: Thu, 22 Nov 2001 00:53:24 -0800 (PST) From: Koen Schreel To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/32180: doscmd fails to run properly when compiled without X-support but running under X Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 32180 >Category: bin >Synopsis: doscmd fails to run properly when compiled without X-support but running under X >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 22 01:00:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Koen Schreel >Release: 4.4-STABLE as of nov 20 >Organization: Eindhoven University of Technology >Environment: FreeBSD diabolo.wop.wtb.tue.nl 4.4-STABLE FreeBSD 4.4-STABLE #1: Wed Nov 21 12:38:42 CET 2001 koens@diabolo.wop.wtb.tue.nl:/usr/obj/usr/src/sys/DIABOLO i386 >Description: When doscmd is compiled without X-support (by setting the NO_X environment variable), code remains that still sets xmode=1 when running the program under X (i.e. the DISPLAY environment variable is set in the shell). >How-To-Repeat: >Fix: The code can be found at line 138 and 139 of /usr/src/usr.bin/doscmd/doscmd.c. I see two ways of fixing the problem: (1) surround the code by an #ifndef NO_X #endif pair (2) discard the two lines entirely Option (2) is my favourite because there is no way of getting non-X output with X-support compiled in and running under X (unless the DISPLAY variable is unset). This is a big disadvantage when using doscmd in scripts since in xmode, when the dos program finishes, doscmd does not. An alternative would be to include a command line option to switch xmode off explicitly. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message