On Feb 9 13:25, Steven Bardwell wrote: > I have a simple programs that show the following issue: > > 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 -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
pgpB3uqu8xCnm.pgp
Description: PGP signature