delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.7 required=5.0 tests=AWL,BAYES_40,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_QL,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4E718523.30103@gmail.com> |
Date: | Thu, 15 Sep 2011 06:54:59 +0200 |
From: | Marco atzeri <marco DOT atzeri AT gmail DOT com> |
User-Agent: | Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: How do I run a program compiled in cygwin from a program that is running in a Windows CMD shell? |
References: | <loom DOT 20110915T060405-768 AT post DOT gmane DOT org> |
In-Reply-To: | <loom.20110915T060405-768@post.gmane.org> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 9/15/2011 6:13 AM, Ted Byers wrote: > The program run, and works, but ... > > I have a perl program running from a WIndows CMD shell, that needs to somehow > run it in bash (with my usual environment when I run the bash shell) > > If I run bash, I invoke my program my program using './qlt' followed by almost > a dozen commandline arguments. > > If I had compiled it using MSVC++, I could invoke it from my perl program > using "my $op = `qlt a nb c args`;" > > How do I modify what is within perl's backticks so that qlt is invoked as a > child in my normal bash environment? Can it be done? > > I am not asking about building the program so it doesn't need to run within > cygwin's bash. I have other tools that let me do that if I must. Rather, I > want to make a child process that has the cygwin environemt even though the > parent process does not. > > Thanks > > Ted bash --login -C "your command here" Not clear from your description if your perl is cygwin one or not. It seems not. Look also cygwin.bat, you can copy and adapt the bash invocation to a your needs. Regards Marco -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |