Re: Clearing /var/tmp on boot

From: Peter Jeremy <peterjeremy_at_acm.org>
Date: Mon, 28 Dec 2009 22:41:31 +1100
On 2009-Dec-28 00:22:12 +0100, Jilles Tjoelker <jilles_at_stack.nl> wrote:
>Another alternative is to enable /etc/periodic/daily/110.clean-tmps.
>That one is a bit overzealous though, also deleting sockets that are
>still in use.

I wrote a tool for $work that (amongst other things) does periodic
cleanups.  In order to avoid this problem, it uses lsof(8) to confirm
that a candidate for deletion is not in use before deleting it.

It would be nice if there was a system call like unlink(2) which failed
if the file was open...

-- 
Peter Jeremy

Received on Mon Dec 28 2009 - 10:41:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:59 UTC