delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/15/12:50:20

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Dave Korn" <dk AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: Ctrl-Z fails to suspend Windows programs
Date: Tue, 15 Jun 2004 17:49:23 +0100
MIME-Version: 1.0
In-Reply-To: <87ekogc0uq.fsf@eu.citrix.com>
Message-ID: <NUTMEGAusVxONvzyJxA00000398@NUTMEG.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 15 Jun 2004 16:49:23.0796 (UTC) FILETIME=[B65A6140:01C452F8]

> -----Original Message-----
> From: cygwin-owner On Behalf Of John Cooper
> Sent: 15 June 2004 16:12

>  > I don't think there's a reliable enough mechanism by which 
> a shell could
>  > detect one case from the other.
> 
> Below is the code it used to determine if a program is a GUI 
> program or not. I
> don't know how well it works under all conditions; however it 
> did work fine for
> me.

  Well, it doesn't WFM for cygwin binaries.  I used the following command to
determine the Subsystem value from the optional headers for every exe in the
/bin directory of my cygwin installation:

find /bin -type f -name \*.exe -exec echo echo \{\} \&\& objdump
--all-headers \{\} \| grep Subsystem \| grep -v Major \|grep -v Minor \;
>temp.sh

[followed by "chmod u+x temp.sh ; ./temp.sh", of course]

and the only files which show up as "Windows GUI" rather than "Windows CUI"
are checkers.exe, fluid.exe, glpuzzle.exe, ipc-daemon2.exe, mandelbrot.exe,
rubyw.exe and wish84.exe.  So it wouldn't spot my earlier example, insight.

  Then I tried it again on the files in /usr/X11R6/bin.  It only identified
run.exe, Xnest.exe, Xprt.exe and XWin.exe as GUI apps.  That seems like a
way bad false-negative ratio to me.

  However it should be fairly reliable for pure 'doze apps.

> Even if not perfectly reliable, could something like this be 
> added but disabled
> by default?  I for one would find it useful.

  It's a matter for the cygwin bash/zsh maintainers.  On the whole cygwin
apps maintainers tend to prefer not to maintain cygwin-local patches for the
long term, so it's liable to come down to the attitude of the upstreams in
the end.  But the matter is entirely technically feasible.  PTC?


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019