Kevin T Cella wrote:
Offer an alternative. As I mentioned in my original post, I got this
script online. In using it I found it was not sufficient, I started
this thread in the hopes that someone would provide me with a better
wrapper script. Instead I got a bunch of replies about how it is a bad
idea to use Activestate with cygwin.
But it is a bad idea to use ActiveState under Cygwin. Would you prefer
if we lied to you?
My scripts are written to make my life on Windows easier, so that
means using Windows specific code to automate common tasks.
But you really don't need to do such things in a "Windows specific" way!
I used to run my whole domain under Cygwin. Apache for my web server,
exim for a mail server, Cygwin's own inetutils for ftp, ssh, etc.
Everything ran fine albeit a bit slower due to the fact that Cygwin is
an emulation environment.
Eventually I got another box and initially installed SuSE on it and
moved over all my scripts and processes. Porting was minimal at best
because I grew up on HP-UX actually in a Unix environment and just
thought that way. Later I moved to Fedora Core 3 which is what I have
today.
But again, the point is that I use scripts to make my life easier too.
And my scripts were written with a Unix mentality to start with and
leaned on Cygwin to provide that Unix/Linux/Posix style environment. My
scripts are useful and work well and ported with minimal effort.
Just because you're one a Windows box doesn't mean you have to code like
Microsoft!
Ideally I'd prefer to stay in a pure Linux environment, but for
reasons I do not need to go into, I am stuck with Windows.
Again, that's the whole point of Cygwin at least to me. You can be
"stuck with Windows" and still think with a Unix/Linux mindset and get
even more useful work done with less effort.
It was my understanding that the intent of this mailing list was to
offer a place to discuss issues involving cygwin and develop solutions
to those problems.
And if the real, long term, more portable solution is to use a Cygwin
based, thus more normal Perl...
BTW you never told me what setsid does under ActiveState Perl...
Seeing as I do not have a whole lot of free time to research a better
solution, I hoped a quick answer would be provided via this medium.
Answers were provided to you. Apparently they don't tickle your fancy.
People have commented on that wrapper script that you posted. I still
don't see what your problem is. If your Perl script expects
C:\mydir\foo.dat then give it C:\mydir\foo.dat. Of course you'll need to
do that under a cmd shell or, for Cygwin's bash shell you'll need to
double the backslashes (C:\\mydir\\foo.dat) or use forward slashes
(C:/mydir/foo.dat). If you insist on giving your Perl script
/cygdrive/c/mydir/foo.dat then perhaps your Perl script should expect
that and translate it. A quick Perl subroutine to do that shouldn't be
that hard to code.
While I appreciate the suggestions that have been made on this thread,
I want to install two copies of the perl interpreter or port my
existing scripts to cygwin as that appears to be the compromise. Are
there any other ideas?
I don't think there is anything stopping an ActiveState Perl script to
call a simple Perl subroutine that translates any Cygwin style paths to
paths that ActiveState likes seeing.
--
Andrew DeFaria <http://defaria.com>
I want to die peacefully in my sleep like my grandfather... Not
screaming and yelling like the passengers in his car.
--
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/