Date: Sun, 28 Nov 2010 20:43:24 -0800 From: Garrett Cooper <gcooper@FreeBSD.org> To: d@delphij.net Cc: FreeBSD-Hackers <freebsd-hackers@freebsd.org> Subject: Re: Is it possible to have file removed upon process exit? Message-ID: <AANLkTina9qH5g_uSauCe2jNEatkOdfixCuRYi_yLswY2@mail.gmail.com> In-Reply-To: <4CEEC3BD.3080204@delphij.net> References: <4CEEC3BD.3080204@delphij.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 25, 2010 at 12:14 PM, Xin LI <delphij@delphij.net> wrote: > -----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. =A0This > 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. =A0Is there a clean way to do this? Does it have to be nameless and/or unique? Thanks, -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTina9qH5g_uSauCe2jNEatkOdfixCuRYi_yLswY2>