delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/08/15/10:46:48

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4A86CA3F.9010204@cwilson.fastmail.fm>
Date: Sat, 15 Aug 2009 10:46:23 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] Updated: run-1.1.11-1
References: <20090814144442 DOT GF32408 AT calimero DOT vinschen DOT de> <20090814151921 DOT GA28983 AT ednor DOT casa DOT cgf DOT cx> <20090814152904 DOT GG32408 AT calimero DOT vinschen DOT de> <20090814154349 DOT GA10002 AT ednor DOT casa DOT cgf DOT cx> <20090814162049 DOT GH32408 AT calimero DOT vinschen DOT de> <4A859A59 DOT 1040308 AT cwilson DOT fastmail DOT fm> <4A85A9F3 DOT 9090108 AT cwilson DOT fastmail DOT fm> <20090814184157 DOT GI32408 AT calimero DOT vinschen DOT de> <20090814184849 DOT GJ32408 AT calimero DOT vinschen DOT de> <4A85D99B DOT 80101 AT cornell DOT edu> <20090815085738 DOT GB13648 AT calimero DOT vinschen DOT de>
In-Reply-To: <20090815085738.GB13648@calimero.vinschen.de>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

Corinna Vinschen wrote:
> On Aug 14 17:39, Ken Brown wrote:
>> On 8/14/2009 2:48 PM, Corinna Vinschen wrote:
>>>> Given that the X server shortcut is just a `run /usr/bin/startxwin.bat',
>>>> is it possible that the new incarnation doesn't start cmd correctly?
>>> I built with -DDEBUG and it appears that startxwin.bat runs fine,
>>> but the "run within run" inside of startxwin.bat
>>>
>>>   %RUN% XWin -multiwindow -clipboard -silent-dup-error
>>>
>>> fails silently.
>> I can confirm that the shortcut to start the X server doesn't work on my  
>> XP system with the patched run.  But my shortcut for starting emacs  
>> (http://cygwin.com/ml/cygwin/2009-08/msg00379.html), which has a very  
>> similar run within run, works fine.
> 
> Apparently `run XWin' doesn't work at all anymore, everything else seems
> to work fine.  A shortcut starting XWin directly w/o run works fine as
> well.  Is XWin allergic against the pipe redirection, maybe?

Hmm. I've been testing using the XMing xserver, just to avoid any
possible complications on the client side; that's why I didn't notice
the problem.

It seems that emacs.exe (and even emacs-X11,exe) are both console
programs, while XWin.exe is a GUI program (that is, "objdump -p $prog |
grep ^Subsystem" reports

Subsystem               00000002        (Windows GUI)

rather than

Subsystem               00000003        (Windows CUI)

So...food for thought.



Anyway, I thought about adding a cmdline switch to run, to allow the
user to choose whether stdio handle redirection should happen.  But I'd
really rather it were automatic.  Then I got to thinking, /IF/ the
problem is GUI mode programs, then...maybe run can probe the PE header,
determine if the target is already GUI, and if so...just launch it using
exec (_spawn on MinGW)?

That way, all this mess is avoided -- really, the console-hiding
property of "run" is kinda pointless for GUI progs; the only value it
adds in that case is (a) -p setting the PATH, and (b) -wait.  So...just
skip all the console-hiding stuff.

Do you think this idea is worth pursuing?

--
Chuck

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

- Raw text -


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