From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13893 invoked by alias); 6 Feb 2014 22:53:17 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 13883 invoked by uid 89); 6 Feb 2014 22:53:16 -0000 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 Received: from mail-lb0-f173.google.com (HELO mail-lb0-f173.google.com) (209.85.217.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 06 Feb 2014 22:53:16 +0000 Received: by mail-lb0-f173.google.com with SMTP id s7so516975lbd.32 for ; Thu, 06 Feb 2014 14:53:12 -0800 (PST) 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) Received: by 10.114.57.9 with HTTP; Thu, 6 Feb 2014 14:53:12 -0800 (PST) In-Reply-To: <52F40DE5.4060800@cygwin.com> References: <000001cf226a$e8d47830$ba7d6890$@lbmsys.com> <52F2606E.4030204@cygwin.com> <012a01cf2342$6d7dd310$48797930$@lbmsys.com> <52F3E1C4.4020801@cygwin.com> <025f01cf2388$d2542cd0$76fc8670$@lbmsys.com> <52F40DE5.4060800@cygwin.com> Date: Thu, 06 Feb 2014 22:53:00 -0000 Message-ID: Subject: Re: using spawn functions to avoid fork() errors From: David Conrad To: cygwin@cygwin.com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00120.txt.bz2 >>> 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