tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pidfile_lock(3)



Hi.

"James K. Lowden" <jklowden%schemamania.org@localhost> wrote:
 |mlelstv%serpens.de@localhost (Michael van Elst) wrote:
 |> roy%marples.name@localhost (Roy Marples) writes:
 |>>See here:
 |>>http://mail-index.netbsd.org/tech-userlevel/2016/03/21/msg009799.html

Well, btw., the MUA i maintain forks, keeping a communication pipe
to its parent, then creates the dotlock file, lingering on the
channel to get the "delete file" info.  Shall the parent die the
channel will close, which also counts as "delete file".  Thus
there will be no lingering pid file unless someone maliciously
kills that child or the system crashes: unfortunately there exists
no O_ flag that could be used to overcome the latter problem,
something that would allow file deletion but keep the name in the
in-memory VFS layer, so to say, unless the reference goes.  But
that can't be helped from userspace.

--steffen


Home | Main Index | Thread Index | Old Index