delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/11/17:26:03

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Wed, 11 Oct 2000 17:23:58 -0400
To: cygwin AT sources DOT redhat DOT com
Subject: Re: argv weirdness with latest snapshot
Message-ID: <20001011172358.A13743@cygnus.com>
Reply-To: cygwin AT sources DOT redhat DOT com
Mail-Followup-To: cygwin AT sources DOT redhat DOT com
References: <80256975 DOT 002D984F DOT 00 AT d06mta06 DOT portsmouth DOT uk DOT ibm DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.3.6i
In-Reply-To: <80256975.002D984F.00@d06mta06.portsmouth.uk.ibm.com>; from BHOLAM@uk.ibm.com on Tue, Oct 10, 2000 at 08:51:51PM +0100

On Tue, Oct 10, 2000 at 08:51:51PM +0100, BHOLAM AT uk DOT ibm DOT com wrote:
>You wanted some testing of the latest snapshot for the upcoming 1.1.5 so
>here goes.
>
>I have a program that uses the Windows API CreateProcess to run another
>program. This is a very small program which I compile using -mno-cygwin.
>If the execed program is a non-cygwin program then the argument list is as
>expected.
>If the execed program is a cygwin program then the argument list also
>includes the parent program.
>I only see this behaviour with the latest snapshot, 1.1.4 was OK.
>
>Attached should be a small testcase exec.tar. Just extract and 'sh runme'.
>The child program just prints the number of arguments and the argument
>list. With 1.1.4 you should see:
>
>$ sh runme
>Run no-cygwin child
>1
>C:\home\mike\db2\ntclp\winchild.exe
>Run cygwin child
>1
>/home/mike/db2/ntclp/cygchild.exe
>
>With the latest snapshot you see ( notice the difference in the argument
>list when running the cygwin child):

You're passing all of the argv information from the parent cygwin process
to a child cygwin process so cygchild is going to use the argv list set up
by sh when it execed exec1.

If you don't want this behavior, zero out startInfo.lpReserved2 and
startInfo.cbReserved2.

cgf

>$ sh runme
>Run no-cygwin child
>1
>C:\home\mike\db2\ntclp\winchild.exe
>Run cygwin child
>2
>./exec1
>cygchild.exe
>
>I am willing to entertain the possibility that I may not be using
>CreateProcess correctly as my Windows programming is not that strong but
>there is certainly a
>difference in behaviour between 1.1.4 and the latest snapshot.
>
>(See attached file: exec.tar)
>
>Regards, Mike
>
>Michael J. Bhola / DB2 Technical Specialist
>Managed SAP Services / Mailpoint: DGC North Harbour
>DDI: +44 (0)2392 564752 / Internal: 7-254752
>Internet: bholam AT uk DOT ibm DOT com / Notes: bholam AT ibmgb


>--
>Want to unsubscribe from this list?
>Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

-- 
cgf AT cygnus DOT com                        Cygnus Solutions, a Red Hat company
http://sourceware.cygnus.com/         http://www.redhat.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019