spawnv() unlocks files in the calling program

Corinna Vinschen corinna-cygwin@cygwin.com
Sun Feb 9 20:40:00 GMT 2014


On Feb  9 15:06, Steven Bardwell wrote:
> > 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
> 
> To test this, I start this program to check for the lock:

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.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140209/264f1340/attachment.sig>


More information about the Cygwin mailing list