X-Spam-Check-By: sourceware.org
Date: Fri, 31 Mar 2006 09:17:45 -0500 (EST)
From: Igor Peshansky <pechtcha@cs.nyu.edu>
Reply-To: cygwin@cygwin.com
To: Eric Blake <ebb9@byu.net>
cc: cygwin@cygwin.com, jerry@hedden.us
Subject: Re: 'run' command quirks
In-Reply-To: <442CAC78.60006@byu.net>
Message-ID: <Pine.GSO.4.63.0603310910550.8753@access1.cims.nyu.edu>
References: <20060329080243.fb30e530d17747c2b054d625b8945d88.2650412c0c.wbe@email.email.secureserver.net>  <442CAC78.60006@byu.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

On Thu, 30 Mar 2006, Eric Blake wrote:

> According to Jerry D. Hedden on 3/29/2006 8:02 AM:
> > I am trying to run the Windows version of gVim from a bash script using
> > the 'run' command.
> >
> > However, the following fails:
> >     run '/cygdrive/c/program files/vim/vim64/gvim.exe'
> > with the following dialog box:
> >     Error: Couldn't find "/cygdrive/c/program files/vim/vim64/gvim.exe"
>
> run might not be able to figure out the virtual /cygdrive.  Try using
> cygpath to convert the filename into a windows path that run will be able
> to understand.

run has no problem with /cygdrive (it's linked with cygwin1.dll, after
all).  What confuses it are the spaces in the path.  From a quick look at
the run source, it parses the command line twice -- once to skip the
executable name, and the other to determine the name of the program to run
-- using two separate bits of code.  It's quite possible that there is a
bug in either bit of code (one in WinMain, and another uses my_strtok).
Can't look further at the moment, but, FWIW, if you recompile run with
-DDEBUG, it'll show a trace of its progress using MessageBoxes.  Plus,
there's always gdb. :-)
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

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

