delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/23/05:37:16

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <49C76643.9050000@free.fr>
Date: Mon, 23 Mar 2009 11:36:51 +0100
From: Sylvain RICHARD <sr75pro AT free DOT fr>
User-Agent: Thunderbird 2.0.0.18 (Windows/20081105)
MIME-Version: 1.0
To: Cygwin Tech List <cygwin AT cygwin DOT com>
Subject: Re: 1.7.0: Getting a Windows app to run synchronously to a script from which it is invoked
References: <49C6D72D DOT 4090804 AT veritech DOT com>
In-Reply-To: <49C6D72D.4090804@veritech.com>
X-IsSubscribed: yes
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

Lee D.Rothstein wrote:
> This is in all probability, not a bug. I suspect it falls into CGF's
> category of "works but isn't (wasn't) guaranteed."
>
> All of my scripts (developed under Cygwin 1.5 or earlier) that involve
> a Windows native app use:
>
>  winapp "$(cygpath -w $something)"
>
> have stopped working "properly" since I installed Cygwin 1.7.
>
> Here's the script I use, FOR EXAMPLE, for invoking Windows Explorer to 
> the
> current directory or a specified Cygwin directory path, AND that stops
> further use of the invoked from "terminal" window, until this Explorer
> window terminates:
>
>  #!/usr/bin/bash
>
>  if [[ -n "$1" ]] ; then cd "$1" ; fi
>  explorer "$(cygpath -w .)"
>
> Explorer opens okay, but always to the "Computer" folder, rather than the
> current working or specified directory. (Yes, I know that there is a
> special option for Explorer in 'cygstart'. Please read on.)
In the special case of the shell, there's also MS's wisdom to consider. 
To wit:
http://support.microsoft.com/kb/152457
>
> I found that I can make the above work by replacing the invocation using
> 'cygpath' with a 'cygstart' initiated invocation without 'cygpath', at
> all. The problem with this latter fix, however, is that 'cygstart' 
> invokes
> the Windows app asynchronously to the script in which it is contained.
> Sometimes I want the script continuance to be "tethered" to the Windows
> app, and the only way to do this (that I can see), is to put an otherwise
> superfluous 'read' statement right after the Windows app invocation. 
> Ugly,
> and not as obvious, to the user, as the old method.
>
> Is there no straight-forward way to invoke a windows app from a script
> synchronously with Cygwin 1.7?
>
>
> -- 
> 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/
>
>


-- 
Sylvain RICHARD


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