X-Recipient: archive-cygwin@delorie.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:message-id:date:from:reply-to:subject:to
	:mime-version:content-type; q=dns; s=default; b=bMx0rwUx8j+wVQlM
	j8ekFo/qCzT3LXy2RbOR+hTBPClmS1EWRlwP2gY5VeTkiICvOsRtS/ugf7YJMTai
	sXa+BlN8BlE1mmuz1BKObQZR+8iRbXxHUy8x8zNxiqZ0DHNTsqj/RQnXIoilebqY
	s4HVqDe4alLxcf9QOhmsSRH0aDQ=
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:message-id:date:from:reply-to:subject:to
	:mime-version:content-type; s=default; bh=tCwQJukcX8mTkkjmfdH5z1
	78mL8=; b=UVTl8D+VNzv8Y8/ugnyR+tR3W251Vn+5QNtwQO/ZxERux0sQVdpiEN
	VMikoOhKyyQTIImizNZbOnzjPgUwJWLOL0MBeRcwGbt9gBZLoPPDZKbcpUnaiBmI
	LlBDvNe4nhJo/LLIR0yKa+uS9VzGgvC6r+ct7CNq49OHCuGiIDJmk=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.0 required=5.0 tests=AWL,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: nm10-vm0.bullet.mail.bf1.yahoo.com
Message-ID: <1413488630.82429.YahooMailNeo@web162806.mail.bf1.yahoo.com>
Date: Thu, 16 Oct 2014 12:43:50 -0700
From: John Wiersba <jrw32982@yahoo.com>
Reply-To: John Wiersba <jrw32982@yahoo.com>
Subject:  Starting mintty via run.exe
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-IsSubscribed: yes

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

Thanks!

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

