Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Dec 2009 22:41:31 +1100
From:      Peter Jeremy <peterjeremy@acm.org>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        FreeBSD current mailing list <current@freebsd.org>
Subject:   Re: Clearing /var/tmp on boot
Message-ID:  <20091228114131.GB11463@server.vk2pj.dyndns.org>
In-Reply-To: <20091227232212.GA18893@stack.nl>
References:  <200912272256.13436.ken@mthelicon.com> <20091227232212.GA18893@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

--eJnRUKwClWJh1Khz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2009-Dec-28 00:22:12 +0100, Jilles Tjoelker <jilles@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...

--=20
Peter Jeremy

--eJnRUKwClWJh1Khz
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAks4mWoACgkQ/opHv/APuIdXJACgtm4sYPSXqFajx5XO6MCfhmCb
12cAn0DNSaUmTt/Iv3hyyvAgBWLRuYPp
=DuLp
-----END PGP SIGNATURE-----

--eJnRUKwClWJh1Khz--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091228114131.GB11463>