delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/02/07/10:35:39

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=Ektu7MGePFplBZxI
vUoY13HU3cDWhQVyBEFlI3bmABM6a13/a+L9eHSj3vHtEmpafkC/wPTBBeId4M+0
InnFJNYT1zYoHgsCpKr/fFDrQW0IimwHuFcMwd6OFmhSUzIkMseNuC3LQZ+376GO
Mj7HgeBqHFK5xe0IDW1VQx7GMEo=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=uxSn4CWi6wyc6j16aUegPs
+pjKY=; b=hU/6RNpMRo/yZMQAXhIy4YxusVcvvGonobwVoZLZUk2E+lxQ0RVAPg
MnqiPuniI+n6e7wqwpGRQmU33Fu6Zx3rEQ+W4LGOzVP3UQ/TQcJPPaXWcKtZyi3l
3cm6Zb8/flJKYetVBbP/WP3ctiuY2RvRM42KH0hH0F5SeGqiQ45bE=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=4.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2
X-HELO: smtpback.ht-systems.ru
Date: Fri, 7 Feb 2014 19:23:11 +0400
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: Andrey Repin <cygwin AT cygwin DOT com>
Message-ID: <18810323152.20140207192311@mtu-net.ru>
To: Steven Bardwell <sbardwell AT lbmsys DOT com>, cygwin AT cygwin DOT com
Subject: Re: using spawn functions to avoid fork() errors -- FIXED
In-Reply-To: <029e01cf2409$2cbc7e90$86357bb0$@lbmsys.com>
References: <029e01cf2409$2cbc7e90$86357bb0$@lbmsys.com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Steven Bardwell!

> I found  the problem that was causing the failure of child creation logic
> on the 64-bit install but not on the 32-bit version:

> in an effort to make the output from 'ps' more useful, my application was
> over-writing the contents of argv[1] in the main process. This trick works
> fine in many flavors of Unix (including Interix and Linux and 32-bit
> Cygwin).

CYGWIN=wincmdln
?

> However, in Cygwin 64-bit, it somehow corrupts things such that the
> child process created by fork() or spawnv() failed to load correctly. After
> removing that 'feature,' both spawnv() as well as the original fork() logic
> work without any problem.

Could still be NULL termination problem. If the strings you manipulating are
in UTF16, you need TWO \0 to terminate the string.


--
WBR,
Andrey Repin (anrdaemon AT yandex DOT ru) 07.02.2014, <19:21>

Sorry for my terrible english...


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

- Raw text -


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