Re: On file locking

From: Antti Haapala <antti(dot)haapala(at)iki(dot)fi>
To: Kevin Brown <kevin(at)sysexperts(dot)com>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: On file locking
Date: 2003-02-03 10:29:47
Message-ID: Pine.GSO.4.44.0302031225580.8837-100000@paju.oulu.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> That same documentation mentions that locks acquired using flock()
> will *not* invoke the mandatory lock semantics even if on a file
> marked for it, so I guess flock() isn't implemented on top of fcntl()
> in Linux.

They're not. And there's another difference between fcntl and flock in
Linux: although fork(2) states that file locks are not inherited, locks
made by flock are inherited to children and they keep the lock even when
the parent process is killed with SIGKILL. Tested this.

Just see man syscall, there exists both
flock(2)
and
fcntl(2)

--
Antti Haapala
+358 50 369 3535
ICQ: #177673735

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Igor Georgiev 2003-02-03 11:29:27 Re: [mail] Re: Windows Build System
Previous Message Þórhallur Hálfdánarson 2003-02-03 09:13:43 psql: Prompt change