Surviving /dev/null disappearance
Jeremie Le Hen
jeremie at le-hen.org
Thu Apr 5 21:05:39 UTC 2007
Hi, Maxim, Andrew, Chuck,
On Wed, Apr 04, 2007 at 04:28:38PM -0700, Maxim Sobolev wrote:
> >>Isn't there some safety-net wrapper function that
> >>refuses to remove device nodes and maybe some other
> >>types of files?
> >
> >Why not set a filesystem flag like schg on device nodes under a devfs
> >tree...?
>
> Well, I suspect that it may cause ld(1) fail instead. What we want it to
> do is to not perform unlink(2) before open(2) when -o argument is device
> node.
Do you have any idea why ld(1) doesn't merely use open(2) with
O_TRUNC, instead of unlinking the file ?
Regards,
--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
More information about the freebsd-current
mailing list