Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Nov 2001 00:53:24 -0800 (PST)
From:      Koen Schreel <k.r.a.m.schreel@tue.nl>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/32180: doscmd fails to run properly when compiled without X-support but running under X
Message-ID:  <200111220853.fAM8rOL10679@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111220853.fAM8rOL10679>