delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/10/16/23:51:24

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:references:message-id:date:from:reply-to
:subject:to:in-reply-to:mime-version:content-type; q=dns; s=
default; b=hVgyghQNQbtSIvR2cHTjIkd2smdm8SGUBmLx77p+hYNr09llM8rGh
OJHNvAT+g+mN03UEcIJPVvNxKX96crvVHrWk7gd9ALa5A10lhNn2Y8UhFLSbw/Rt
NeCm1WeqxfZ8mZ0iKbv80u9Cx/95yoPrtkEclWn32w8CdbmZ7UDF6A=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:references:message-id:date:from:reply-to
:subject:to:in-reply-to:mime-version:content-type; s=default;
bh=O3eusDIhRjCGVoEBqGhtDWXJLsM=; b=KuE8REz2jTYj6JtMjdueejzmtvIw
Zdo7Q1c711R1+UlMxuFSuCyKei41QInAjokTmjHQFC4By9PS376NNxWr6HHR+MaZ
f3MmwlJ3Kr9eBTMKQDQjhpOxiHs0+Bl4aOZ9bBmOgY9o5O3lqUQuQJd06CEGhJPL
qBLsqhFeKiwtcaY=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2
X-HELO: nm22-vm1.bullet.mail.bf1.yahoo.com
References: <1413488630 DOT 82429 DOT YahooMailNeo AT web162806 DOT mail DOT bf1 DOT yahoo DOT com> <544055FF DOT 2030604 AT cs DOT umass DOT edu> <1413517183 DOT 86611 DOT YahooMailNeo AT web162801 DOT mail DOT bf1 DOT yahoo DOT com>
Message-ID: <1413517863.36122.YahooMailNeo@web162806.mail.bf1.yahoo.com>
Date: Thu, 16 Oct 2014 20:51:03 -0700
From: John Wiersba <jrw32982 AT yahoo DOT com>
Reply-To: John Wiersba <jrw32982 AT yahoo DOT com>
Subject: Re: Starting mintty via run.exe
To: "moss AT cs DOT umass DOT edu" <moss AT cs DOT umass DOT edu>,
"cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
In-Reply-To: <1413517183.86611.YahooMailNeo@web162801.mail.bf1.yahoo.com>
MIME-Version: 1.0
X-IsSubscribed: yes

> ----- Original Message -----
> From: Eliot Moss <moss AT cs DOT umass DOT edu>
> To: cygwin AT cygwin DOT com
> Subject: Re: Starting mintty via run.exe

>

> I think it may be designed to deal only with actual executables (.exe files).
> The wording of the man page is ambiguous, but suggestive of this in that it
> speaks of "Windows programs".
>
> So maybe you want: run /bin/bash -c /path/to/hashbang/script
>
> This worked for me with a trival mintty-starting hash-bang bash script.
>
> Regards -- Eliot Moss

I found your reply on the mailing list archives and quoted it above.  Yes, the same approach worked for me (in my original question I used perl rather than bash -c, since my script was written in perl).  That's mainly an annoyance that I have to specify the interpreter directly, rather than use the shebang line.  But I'm trying to get confirmation that it's not a "bug" but rather the way run.exe was designed.


However, do you have any ideas about the flashing window which appears and then immediately disappears before the mintty terminal starts?  That's a show-stopper.  I thought that was what run.exe was supposed to prevent by making that console window hidden?  Do you get the same flashing console window with your trivial mintty-starting script?


-- John



----- Original Message -----
> From: John Wiersba <jrw32982 AT yahoo DOT com>
> To: "moss AT cs DOT umass DOT edu" <moss AT cs DOT umass DOT edu>; "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
> Cc: 
> Sent: Thursday, October 16, 2014 11:39 PM
> Subject: Re: Starting mintty via run.exe
> 
> Eliot,
> 
> I'm sorry for double posting.  I subscribed this morning, sent back the 
> confirmation email, posted my question and...didn't hear anything.  I never 
> got my original question from the list nor your reply.  Not in my inbox nor in 
> my spam folder.  I figured that my question must have somehow been discarded 
> because I wasn't registered on the list yet.  
> 
> After an hour or two, I tried resubscribing to the list (I was already 
> subscribed) and then reposted my question.  I did later see an announcement from 
> Corinna, a post from Ken Brown about emacs and ispell, an announcement from Jon 
> Turney, a post from Christian Franke about exec and PATH, and finally another 
> emacs post from Ken Brown.
> 
> 
> I will check the list archives for your reply, since I still don't know what 
> it is.  Thanks in advance for your reply.
> 
> 
> -- John
> 
> 
> 
> 
> ----- Original Message -----
>>  From: Eliot Moss <moss AT cs DOT umass DOT edu>
>>  To: cygwin AT cygwin DOT com
>>  Cc: jrw32982 AT yahoo DOT com
>>  Sent: Thursday, October 16, 2014 7:34 PM
>>  Subject: Re: Starting mintty via run.exe
>> 
>>  On 10/16/2014 3:43 PM, John Wiersba wrote:
>> 
>>>   I'm trying to create a Windows shortcut which will start mintty 
>>  indirectly by running a (perl) script which will exec mintty.  I know I can 
> 
>>  start mintty.exe directly via the shortcut, but the purpose of my script is 
> to 
>>  wrap the invocation in the proper environment and arguments.
>>> 
>>>   I'm encountering two problems using run.exe:
>>> 
>>>   1) run.exe doesn't seem to be able to run a hashbang script.  My 
> script 
>>  starts with #!/usr/bin/perl and runs just fine from a cygwin bash command 
> line, 
>>  starting a new mintty terminal as expected.  But calling it from run.exe 
> fails.  
>>  Clicking on the shortcut flashes some kind of terminal window on the 
> screen, 
>>  which appears to have no content (but it is hard to tell, since it flashes 
> so 
>>  quickly) and then the terminal window immediately closes. In this case, my 
>>  shortcut target is: d:\cygwin\bin\run.exe 
> /path/to/hashbang/script.
>>> 
>>>   2)  When I change my shortcut target to: d:\cygwin\run.exe 
> perl 
>>  /path/to/hashbang/script, then it runs the script and starts a mintty 
> terminal 
>>  session, but I still get the flashing terminal window before the eventual 
> mintty 
>>  starts, which I don't want.  I thought the purpose of run.exe was to 
> hide 
>>  such a terminal window?  There must be something I'm not understanding 
> about 
>>  how run.exe works or its purpose.
>>> 
>>> 
>>>   Finally, is there any way I can debug what's going on without 
>>  rebuilding run.exe?  For example, can I prevent the flashing window from 
>>  flashing so quickly (in case there's a message displayed there).
>> 
>>  You posted this same question this morning ...
>> 
>>  And I answered it about 20 minutes later.
>> 
>>  Why are you posting again?  You risk annoying the
>>  list subscribers ...
>> 
>>  Regards -- Eliot Moss
>> 
>>  --
>>  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
>> 
> 

--
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