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:message-id:date:from:reply-to:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=xSJHZJ+stJ+1/0Wc /9h6wttsONmifIWqaC2pzSWw/rJbz+fX8JgO2wGKWFNi/oZpfNEMBkoI2MpVd5jR MIzJRWNzTRXub84oy5R7KYIc3mSZO19LABDLyyheSiZ0GF0o+8VdYDr98DYLnM3H D2Gn2LkLUHpPhw8eQXMBkk/eZAg= 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=+ybYf5Xz6gRalprw3FFL5O WAd/w=; b=gHL1/kHQXhF1oF8aKe3f34iVhSc0raycPqIi8CkOe36dR0nxqRMob3 UJhqGl8K6BceatO0ocVu4ZVNgQfy/5mhdnxvbzR5Qtniwbh0lq5elta7+RIo4Nvb 5lDkYoFYo8U4q7ONi0vleU4/npXek3JTAy/Eccg0K8vxvOZfjb1yU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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.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: <52F2606E.4030204@cygwin.com> Date: Wed, 05 Feb 2014 11:01:50 -0500 From: "Larry Hall (Cygwin)" Reply-to: cygwin AT cygwin DOT 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 AT cygwin DOT com Subject: Re: using spawn functions to avoid fork() errors References: <000001cf226a$e8d47830$ba7d6890$@lbmsys.com> In-reply-to: <000001cf226a$e8d47830$ba7d6890$@lbmsys.com> Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit On 2/5/2014 7:07 AM, Steven Bardwell wrote: >>From reading the Cygwin FAQ ("In most cases, you are better off using the > spawn family of calls if possible.") and > the Cygwin Highlights ("Fortunately, in most circumstances the spawn family > of calls provided by Cygwin can be substituted for a fork/exec pair with > only a little effort."), it sounds like there exists a family of API calls > that may help me avoid the 'Resource temporarily unavailable' errors from calling > fork(). > > However, I can't find any documentation on these spawn functions. I recoded > my application to use > posix_spawn() but I am getting the same 'Resource temporarily unavailable' > error so I suspect that it > is using fork() as well. posix_spawn() comes from newlib and uses vfork. You can take a look at the code on-line for more info: An alternative that doesn't use fork was discussed here: The code referenced isn't part of Cygwin and may or may not work. I have no experience with it. If you choose to use it, forward your comments and questions directly to the author. > I did try the 'rebaseall' process to remove the error, but without any > success. I also checked the BLODA list. > > 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 -> -- 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