fcntl(2) lock on /dev/null fails with EINVAL

Matthew Dillon dillon at backplane.com
Sat Jul 25 19:38:39 PDT 2015


I dunno about allowing lockf on /dev/null.  Any process can open /dev/null,
it isn't unique to whatever you are testing and there could easily be
unintended consequences.  Linux does support it but I dunno how good an
idea that is.

-Matt

On Fri, Jul 17, 2015 at 12:57 PM, Steffen Nurpmeso <sdaoden at yandex.com>
wrote:

> ..and so here is a tiny manual update.
> Just noting that locking succeeds on at least (my outdated) Snow
> Leopard and i like that since /dev/null is the only sane, always
> available option to foist something NULLy into whatever.
> I.e., i use it to be able to have an available NULL mailbox for
> the test (suite is a wording too strong, still).  Yes, it is
> because the BSD Mail codebase i'm sitting upon still doesn't have
> it own VOID object that can be addressed directly.
>
> --steffen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20150725/2469ef81/attachment-0002.html>


More information about the Users mailing list