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=t5+ywuH/JmPYb19/Pd0z7P65mUCiECMHrwGiJK7F4H45Ec+5IXyqh 0TVv6lp2mYlexZcQnnuPcLF0uW3VmOPkYXrBUJN0RuVkDGaZxZKUKDeNcCkccqPy sPXTvrjCTAo+/Ve+U7+fmuxNSHnIOeRLCB/Fz0FTAz5Yn7zTFF0GeA= 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=a0OkxDQOLRp6ipbC/PCB4U9ClDk=; b=f9A+EsWJSiqXb3eydsCOeOrU3dii lfqjZMuOCL5BSLX33pm6Wq54Hp/YwfjO40ypFo/yu77xjaqMy8vH0x0N0LUGlAEa JKFQzlbPjsh31be4jtSIr+MD8/2YGbFYyqS96yOW6Zs85PzkBj/NHvOFOZdfzunm d3wbnBarXkblqvg= 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=-6.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Date: Sun, 9 Feb 2014 20:28:59 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: spawnv() unlocks files in the calling program Message-ID: <20140209192859.GG2821@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <040201cf25c4$54e9cd20$febd6760$@lbmsys.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CuZtzLgFeSWyzOuB" Content-Disposition: inline In-Reply-To: <040201cf25c4$54e9cd20$febd6760$@lbmsys.com> User-Agent: Mutt/1.5.21 (2010-09-15) --CuZtzLgFeSWyzOuB Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Feb 9 13:25, Steven Bardwell wrote: > I have a simple programs that show the following issue: >=20 > 1) program locks a file (in my test /tmp/yyy) > 2) program then calls spawnv() (in my test "/bin/sh -c /bin/touch > /tmp/xxx"). > 3) after the spawnv(), the file /tmp/yyy is no longer locked. How do you test that? You're calling fcntl(F_SETLKW) exactly once at the start of your test application, but never again later. We're talking advisory file locking here, so, where's the next fcntl call waiting for the lock? I debugged your test app and the lock still exists after the spawn call. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --CuZtzLgFeSWyzOuB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJS99b7AAoJEPU2Bp2uRE+gsQoP/1dC4PmdbU+KPoBCNhbKsCV5 g4aW096bha014SqdJtm1yc5KrrOtM73gtJ2+wtEksF18wOHvSmOOijPVhoTwSY2+ fCECSxFpuhyvLONV2Q5CRcYGKaFZ5Zxn34A4+UrGIvX5mYPxWQMV6HEtgUHKfM+P 9C27fLdb7igi/dDOjz2bckCt3lCi4AvMAjmsRgcSngO52biVtMmIgLEZgWTp23SW YSXKKcOB+UP7yO8CEuDTtBDKlFg3uGcrgpRIx+96dlmd6q7uXtPeFaNdVG610ciG Vd387hem/VbHBHebi7ZLeowwD6wZu/xGyabfm/gVXTrzHwBKOjwM3KIcy15w1uds XYK9PdiRP4TI7rsKTR1ELzZNGd9aEm1D49eqZycsn95hJaEl7S+4i5ly/Lv1FC8J 2QoH6ycJfW2spVzv5x6T626Z2Gv8YHcqI7ix3HtahMOB2kVFYrlZlt0/cCz9mNjo 4CROWul+hOpO1CxjKdBdew4DnV1reLMkGptp4Oue6SWuxyuGLGkl6yO1NH/2xGVC yXXhYun3DAlpTLJFp3apnD/FuvK9RaaB2jMPiXNNET9bu8eH/CXrdvs8ZJLf/Pvc 2cQJd9E464AUHPIGy20Jee2qoceMWKugp25jvXdHMfoUf5pvlCQ+EYipw69AF88l Crd+QFSv09ma9StKppZh =SGb7 -----END PGP SIGNATURE----- --CuZtzLgFeSWyzOuB--