X-Spam-Check-By: sourceware.org Message-Id: <1141070017.14148.255392778@webmail.messagingengine.com> From: "Brett Serkez" To: "Jukka Laurila" , cygwin AT cygwin DOT com Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 Subject: Re: Can't execute shell script as wish subprocess, exes work Date: Mon, 27 Feb 2006 14:53:37 -0500 X-IsSubscribed: yes 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 >> It appears your PATH doesn't include the directory for my-shell- >> script. > As I said, my PATH _does_ include that directory > (/cygdrive/c/users/bin). Yes, you did, but you are also not taking into account process inheritance. When you pipe a command, subprocesses are being created and I suspected the path isn't being properly inherited. When you use the the shell to execute your command, you are re-establishing the path. So I'll ammend my original statement to say that it appears your PATH doesn't include the directory for my-shell-script in the process that is trying to exec your script and/or exec isn't using the path you think it is. It has been some time since I dealt with this, but only global variables are inherited, which some shells require you to use export or setenv to designate, and some shells require PATH to be exported and others don't. Brett ---------------------------------------------------------------- Brett C. Serkez, Techie -- 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/