Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Nov 2010 12:14:53 -0800
From:      Xin LI <delphij@delphij.net>
To:        FreeBSD-Hackers <freebsd-hackers@freebsd.org>
Subject:   Is it possible to have file removed upon process exit?
Message-ID:  <4CEEC3BD.3080204@delphij.net>

next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

One pretty common way of having an i-node of a file removed when process
exit is to unlink() it while holding a descriptor of the file.  This
approach, however, have a side effect that other processes would not be
able to access the file via its name.

For certain applications it is sometimes desirable to (e.g. for unix
domain sockets) have file removed when the process quit, regardless
whether the process is quit cleanly.  Is there a clean way to do this?

Cheers,
- -- 
Xin LI <delphij@delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!	       Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iQEcBAEBCAAGBQJM7sO9AAoJEATO+BI/yjfBlRQH/3zzmh6OtmMJs0CWNsH9eOQk
mpSi5BJE9HHIbzPCMSGvujFn/HjQa5K752/A0J7Gulu/2wNYnY6013tuypnHZy0+
tPMVWWWpj3otqJuvcxBMeqNisA9RL+DS2ZMbUQs3t7vd9qHkJE1Honb97nFQ/o57
bUAYFUoFEjBgYiF0JrPQOXxHZacOhEtHrTj9qbtrZM+qcGZl01cTDfHTd7aP5yJ+
HnZVh/0CKMdcOH/9tI04pZ+beK9RwaPVLS0NxIfsVIx+1o1zP3rHIaEWczM21SsU
gDDzQ6ypBE3dEJbQ7OH0UqezjLpX7JKUpSSjC4FRnL4VDZrUAH8Nh6wT+gcncc0=
=1W2r
-----END PGP SIGNATURE-----



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