public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: using spawn functions to avoid fork() errors
Date: Thu, 06 Feb 2014 19:26:00 -0000	[thread overview]
Message-ID: <52F3E1C4.4020801@cygwin.com> (raw)
In-Reply-To: <012a01cf2342$6d7dd310$48797930$@lbmsys.com>

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

  reply	other threads:[~2014-02-06 19:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05 12:08 Steven Bardwell
2014-02-05 16:02 ` Larry Hall (Cygwin)
2014-02-06 13:50   ` Steven Bardwell
2014-02-06 19:26     ` Larry Hall (Cygwin) [this message]
2014-02-06 22:14       ` Steven Bardwell
2014-02-06 22:34         ` Larry Hall (Cygwin)
2014-02-06 22:53           ` David Conrad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52F3E1C4.4020801@cygwin.com \
    --to=reply-to-list-only-lh@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).