Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Mon, 23 Jun 2003 19:23:32 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: "Ling F. Zhang" cc: cygwin AT cygwin DOT com Subject: Re: cygwin and the rest of the Windows In-Reply-To: <20030623202525.79894.qmail@web14202.mail.yahoo.com> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Matthew, FYI, I've been able to associate the following with the .pl extension (in Explorer) and have it work: c:\cygwin\bin\bash.exe -c '"`/bin/cygpath -u "%1"`"' There was no need for extra batch files or anything else. The above also worked when the path contained spaces, but I haven't tested it extensively. As for the apache problem, try adding "." to the PATH (e.g., use c:\cygwin\bin\bash.exe -c 'PATH="$PATH:." "`/bin/cygpath -u "%1"`"' or something like that - again, beware of spaces). You might also want to pass the -x flag to bash... Igor On Mon, 23 Jun 2003, Ling F. Zhang wrote: > Just based on what I have learned so far...I figure > out a more geniune way of how this works: > in cygwin, I made a shell script quo that goes like: > #!/usr/bin/bash > # this program takes user input (STDIN) and put a > quote around it... > # why do I have to do this? well, I can't figure out a > way in dos batch that would do the same...since using > echo autometically adds a "\n" at the end... > printf "\""; > while read LINE > do > printf "$LINE"; > done > printf "\""; > > and I wrote something called "bashwin.bat" that goes > like: > > @echo off > REM this program is used so that executable in cygwin > written in shell or perl or whatever, can be executed > in Windows command > REM just associate this file in explorer with whatever > you want to run (e.g. .pl, .sh) > cygpath -u %1 | bash -c "quo" > tmp > bash --loging < tmp > del tmp > > so now, at command prompt, I can type printenv.pl or > test.sh and they will execute....as if they were in > cygwin, with POSIX path of course... > > the problem is, they still won't work as cgi script... > I got a 500 error (or 500 somthing..) and apache > error.log (apache 2.x for win32) reads like: > [Mon Jun 23 03:41:45 2003] [error] [client 127.0.0.1] > (720003)The system cannot find the path specified. : > couldn't create child process: 720003: printenv.pl > [Mon Jun 23 03:41:45 2003] [error] [client 127.0.0.1] > (720003)The system cannot find the path specified. : > couldn't spawn child process: C:/Program Files/Apache > Group/Apache2/cgi-bin/printenv.pl > [Mon Jun 23 03:43:31 2003] [error] [client 127.0.0.1] > (720003)The system cannot find the path specified. : > couldn't create child process: 720003: test.sh > [Mon Jun 23 03:43:31 2003] [error] [client 127.0.0.1] > (720003)The system cannot find the path specified. : > couldn't spawn child process: C:/Program Files/Apache > Group/Apache2/cgi-bin/test.sh > > now...that I think has to do with the mixed up of > windows path and cygwin path...anyone can figure out > how to do this? -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- 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/