delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/02/06/17:53:32

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:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; q=dns; s=default; b=ul
5x5e22W/kbxhJWmS11lnZPOZkcKoKDsGEKCEVSLA51rqjHPr0U0rUB575/DHrzJy
IBY02okb2E/bvrx1Wjxms6DDmMPfxOSJsdQSPPgiCniJ+LBAbUDxaTN5acATLHoS
xHkLHbdTaMr6OLCgInh+frOJJI+dyXGWXBaumsR2s=
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:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; s=default; bh=qdcL589d
f7TQ8y6X2bLLTsVuRYA=; b=OUZ5i60f+DGsRm37fcFgTS1SSYFVmV2/xDPxymPN
64CID/EyEZW3em5y3HjQMzIKzS8KHIAUUVdnM/jCYf6f3rkC3HHgPm36eqy5YR5R
C9Aecl0Xj9Zkp7qkTlSdUGajIR8iHRoER1v7cKaBkPHpGQgTh4Rrmv80g5pgDQrU
IPA=
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-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-lb0-f173.google.com
MIME-Version: 1.0
X-Received: by 10.152.87.228 with SMTP id bb4mr7686059lab.15.1391727192746; Thu, 06 Feb 2014 14:53:12 -0800 (PST)
In-Reply-To: <52F40DE5.4060800@cygwin.com>
References: <000001cf226a$e8d47830$ba7d6890$@lbmsys.com> <52F2606E DOT 4030204 AT cygwin DOT com> <012a01cf2342$6d7dd310$48797930$@lbmsys.com> <52F3E1C4 DOT 4020801 AT cygwin DOT com> <025f01cf2388$d2542cd0$76fc8670$@lbmsys.com> <52F40DE5 DOT 4060800 AT cygwin DOT com>
Date: Thu, 6 Feb 2014 17:53:12 -0500
Message-ID: <CAEotdw=0=n_sBjgfuyWKvg9xce==0TqWYdxkrhEU2DXxeBBUwQ@mail.gmail.com>
Subject: Re: using spawn functions to avoid fork() errors
From: David Conrad <DavidConrad AT acm DOT org>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

>>> On 2/6/2014 8:50 AM, Steven Bardwell wrote:
>>>> 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.

A few things come to mind as possibilities to check, or try. First,
there is a certain amount of magic that cygwin does to treat
/bin/sh.exe and /bin/sh the same. What happens if you spawn
/bin/sh.exe instead of /bin/sh? Second, what happens if you use
spawnvp instead of spawnv? Although, from the strace excerpt it
doesn't look like it's actually having trouble finding the executable,
so those probably aren't it. Still, worth checking, perhaps.

Third, are you certain you are NULL-terminating the array of
arguments? If you aren't doing so explicitly, it is possible there
happened to be a NULL pointer just after the arguments in memory for
the 32-bit version, so it happened to work, but that didn't happen for
the 64-bit version. The argv array must have a NULL at the end of it.
Fourth, what are you passing to the mode parameter of spawnv?

Or, fifth, I dunno what the problem is. Those are my only ideas. Good luck.

David

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