X-Spam-Check-By: sourceware.org Date: Fri, 31 Mar 2006 09:17:45 -0500 (EST) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Eric Blake cc: cygwin AT cygwin DOT com, jerry AT hedden DOT us Subject: Re: 'run' command quirks In-Reply-To: <442CAC78.60006@byu.net> Message-ID: References: <20060329080243 DOT fb30e530d17747c2b054d625b8945d88 DOT 2650412c0c DOT wbe AT email DOT email DOT secureserver DOT net> <442CAC78 DOT 60006 AT byu DOT net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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 AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT 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/