This is the mail archive of the
mailing list for the Cygwin project.
RE: bash bad interpreter - a new twist!
- From: "david mallon" <dpmallon at hotmail dot com>
- To: nicebounce at trodman dot com, cygwin at cygwin dot com
- Date: Fri, 26 Mar 2004 10:36:00 -0400
- Subject: RE: bash bad interpreter - a new twist!
Thanks Tom, I believe you are right.
I noticed yesterday that if the interpreter was a binary the problem went
away, so I rewrote my script as a C program and everything is stable again.
From: firstname.lastname@example.org (Tom Rodman)
>I'm using cygwin (september 2003 build) and ActiveState perl. To connect
>ActiveState into cygwin I use a proxy /usr/local/bin/perl bourne shell
>script that essentially transalates the paths (cygpath -w) and delegates
>the ActiveState perl.exe binary. Given the following foobar script:
>print "foobar world\n";
The "#!" construct must always refer to a binary,
never to another script (to avoid loops?). I ran into the same issue.
The UNIX standard is what I just said, but earlier (and current?)
cygwin versions (wrongly) sorta supported a script. In 1.3.20 it works
about 2 out of 5 times or so - if you try a similar approach on
a UNIX box it will fail *every* time.
Years back there was a cygwin tool called dbash.exe to support
what your trying to do.
Try "man execve" on a UNIX box for more on the "#!" construct.
You just need to rethink your workaround..
I'm sure others can correct some of what I just said, but I believe
is mostly right ;->
Protect your PC - get McAfee.com VirusScan Online
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html