execl

Eric J eric at deptj.eu
Mon Feb 22 11:09:29 GMT 2016


On Sun, 21 Feb 2016 21:14:05 +0000 (UTC), Eric Lindblad <geirfuglaps at yahoo.com> wrote:
> > Actually I have now found that the fcntl works,  it is the execl which loses the lock!
> 
> Could fork be at issue?

That would sound sensible, but I have stepped through the code (my copy,
obviously) with gdb, checking on the file with lsof in another session.
The sequence is definitely:

    open
    fork
    lock
    execl

with the file showing up in lsof as 5w after the open, staying through
the fork, changing to 5ww with the lock, and back to 5w with the execl.
Which isn't supposed to happen according to any docs I can find.

Thanx,

Eric
-- 
ms fnd in a lbry



More information about the Xapian-discuss mailing list