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 Message-Id: <5.2.1.1.2.20030428224615.01930008@coolbrew.com> X-Sender: gmccrory AT coolbrew DOT com (Unverified) Date: Mon, 28 Apr 2003 22:52:30 -0500 To: cygwin AT cygwin DOT com From: Greg McCrory Subject: Re: Calling perl script from shell script: Win32 error 126 In-Reply-To: References: <5 DOT 2 DOT 1 DOT 1 DOT 2 DOT 20030428215943 DOT 01b9a818 AT coolbrew DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed At 4/28/2003 11:35 PM -0400, Igor Pechtchanski wrote: >Greg, > >No, it's not necessary to set the PATH, I was just trying to guess why >there was a difference between a shell script and the command line... >Just out of curiousity, is the PATH the same in the shell script and in >the shell? > >Also, are you executing Cygwin perl in both cases? Try "type -a perl" >from the shell (bash?)... How are you invoking the script (i.e., by >calling it directly, or through "perl scriptname")? If directly, what >does the shebang ("#!") line at the top of the script say? > Igor I need to add new information to this issue. I mistakenly thought I was getting this error from within a general shell script. I now see the error actually occurs only when the script is run as a service. Example: #!/bin/sh export PERL_DL_DEBUG=1 while sleep 5 do if [ -f "/tmp/flag" ]; then rm /tmp/flag perl -e 'use Image::Magick; print("Hello!");' fi done ## end script When run from command line, works fine. when installed as service yields: <<< Can't load '/usr/lib/perl5/site_perl/5.6.1/cygwin-multi/auto/Image/Magick/Magick .dll' for module Image::Magick: dlopen: Win32 error 126 at /usr/lib/perl5/5.6.1/ cygwin-multi/DynaLoader.pm line 206. >>> -- 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/