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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=G8VNGxTTpXofdjrB+0jyzRc8U350KTXKUwxOkv4sk96q6fDn31vw3 87JcQOX1JvQeOw6uu4OR5I8tBtp88mCLGRU7HBE14p6/bKEMvGJKVnFcB0noPlfs Mugsax2ffkv+FvStWhDCVvoJXPC3/v/4L+F1qxKmbje2T926G/QKCQ= 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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=sscCPZrit2b6K85C4J8CibvGkRY=; b=rGzPOMgd9Xdn8RX9lmzQ0W05p8CJ 5nj+X8zHCXLFtLZmkw5sYoduDIwqzaEM5PdLBgJc0b8GFllTBOaaFaEa53U1XjYS HOrfHvzok5e/rrE+BBUu8Fr2jj46I9dVFngvcv8wMhQEcw0Wji9UOnNpZXrkUkp0 /6L6bN40zWl4qrw= 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-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: mho-01-ewr.mailhop.org X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18/yF8m7+clcSM3VAiIvuax Date: Sun, 9 Feb 2014 23:08:22 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: spawnv() unlocks files in the calling program Message-ID: <20140210040822.GA1044@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <040201cf25c4$54e9cd20$febd6760$@lbmsys.com> <20140209192859 DOT GG2821 AT calimero DOT vinschen DOT de> <041d01cf25d2$6a59e5b0$3f0db110$@lbmsys.com> <20140209203825 DOT GJ2821 AT calimero DOT vinschen DOT de> <045801cf25db$2dc95af0$895c10d0$@lbmsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <045801cf25db$2dc95af0$895c10d0$@lbmsys.com> User-Agent: Mutt/1.5.20 (2009-06-14) On Sun, Feb 09, 2014 at 04:09:03PM -0500, Steven Bardwell wrote: >On Sun, Feb 09, 2014 at 09:38:25PM +0100, Corinna Vinschen wrote: >>Ok, I can reproduce it, but it's too late to debug this today. >> >>I have to say, though, that fcntl advisory locking is POSIX >>functionality, while the spawn functions are not. In fact these >>dreaded spawn entry points are rather old stuff, which hasn't been >>tested for a long time. FWIW, advisory file locking has never been >>tested with them, and the fact that it doesn't work as expected doesn't >>exactly disturb me. >> >Knowing this, I will use the posix_spawn() function -- I wanted to >reduce the number of fork() calls in my application (because of the >many warnings about the complexity of the Cygwin implementation of >fork() and reported problems with it), but if spawnv() won't do what I >need, then under the bus it goes. As I think has been pointed out, posix_spawn uses fork() so you are not going to see any differences there. And, FWIW, Cygwin's spawn/exec are hardly simple either. Both fork and exec are trying to implement something that can't be done easily on Windows. cgf -- 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