X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave.korn@artimi.com>
To: <cygwin@cygwin.com>
References: <5E25AF06EFB9EA4A87C19BC98F5C87531641A1@core-email.int.ascribe.com> <47AB31C7.3040909@cyconix.com> <47AB3B0B.9060902@sbcglobal.net> <47AB4520.2050305@cyconix.com>
Subject: RE: Incomplete environ when running MinGW apps?
Date: Thu, 7 Feb 2008 18:04:08 -0000
Message-ID: <04d801c869b3$d97c8ce0$2e08a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <47AB4520.2050305@cyconix.com>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 07 February 2008 17:51, Paul Leder wrote:

> Hmm. I think you're right; I need to give up looking for a robust way to
> do this. I think I'll:
> 
> if(
>     (system(uname) looks sane) &&
>     (system(cygpath -m /bin/sh) returns success))
>       use CreateProcess with /bin/sh path returned by cygpath;
>   else
>       use CreateProcess with cmd.exe /c
> 
> And I'll need to test it when run from a DOS box, with Cygwin's bin in
> the path.

  Out of curiosity, what's the problem with just using system("...") always?

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
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/

