X-Recipient: archive-cygwin@delorie.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:message-id:date:from:reply-to:mime-version:to
	:subject:references:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=p42Fp5BXmsN26NI7
	Wj3lWT9rYCDKQIhuyt0S3EgB5dbB6JqUFEca9zfIF8LyRVG0+D+nztnUg/buUski
	7/3cu+GIdAclJbUXzt0AJ4On57AiWhqyJiZvttqOyoLWPAL47wDc2mLFuC4SGzLv
	WRvWBwfOPdzt1EwjyvslX70964g=
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:message-id:date:from:reply-to:mime-version:to
	:subject:references:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=kOy9q4F8PPoBM7kKcDCEJl
	zbcRk=; b=jcTfTVeBzK/XXtWw/kVG7tHVYUnrcuqDGT51QEjNihUgqch50LrTc4
	bVZ+TEz9mEpMTg9cKkgDxAC+sEpwxRLlOwFDQ2cKl16BM0GKA2+yoHjclLMKWPu4
	xW17OgANCyHOafxAaoZxoNaLdR0SvNUiwcxq5O2AtbaBPNWtGVggs=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: vms173025pub.verizon.net
Message-id: <52F3E1C4.4020801@cygwin.com>
Date: Thu, 06 Feb 2014 14:25:56 -0500
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh@cygwin.com>
Reply-to: cygwin@cygwin.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-version: 1.0
To: cygwin@cygwin.com
Subject: Re: using spawn functions to avoid fork() errors
References: <000001cf226a$e8d47830$ba7d6890$@lbmsys.com> <52F2606E.4030204@cygwin.com> <012a01cf2342$6d7dd310$48797930$@lbmsys.com>
In-reply-to: <012a01cf2342$6d7dd310$48797930$@lbmsys.com>
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7bit

On 2/6/2014 8:50 AM, Steven Bardwell wrote:
>
>> On 2/5/2014 7:07 AM, Steven Bardwell wrote:
>>> I have no problem doing some recoding of my application to reliably
> solve
>> my
>>> issues with fork() -- can you all
>>> point me in the direction of the 'spawn family of calls'?
>>
>> See spawn.cc ->
>> <http://cygwin.com/cgi-
>> bin/cvsweb.cgi/src/winsup/cygwin/spawn.cc?rev=1.353&content-
>> type=text/x-cvsweb-markup&cvsroot=src>
>>
>>
>> --
>> Larry
>>
>
> Larry - thanks for the link to the source for the spawn() APIs.  It works
> perfectly on my 32-bit install (where, as it happens, the fork() issue
> never shows up either).
>
> However, on my 64-bit install, the spawnv() call is returning with an
> error -- 'No such file or  directory' -- when I try to spawn /bin/sh.
> I have attached the output from 'strace' on this process. If you look at
> line 602, I think you can see where the exception gets generated. Can
> you see what is going on? I tried to create a simple test program that
> shows the problem, but (so far) they all work. Thanks.

Interesting.  No, off hand, the strace output doesn't shed any light on
the situation for me either.  Clearly an access violation occurs when
/bin/sh is spawned but if it only happens in your specific code and not
in a simple invocation of spawn(), that suggests a possible usage problem.
I know, that's not much help. ;-)

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

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

