Loopback fs fails to create a new file every other time on FreeBSD.
This happens because of a Perl bug which occurs when $! is set from Perl
(as in x_mknod()), and then negated after a failed syscall (as in
x_getattr()). See http://www.perlmonks.org/?node_id=906466.
# and possibly run the real mknod command.
my ($file, $modes, $dev) = @_;
$file = fixup($file);
- $! = 0;
+ undef $!;
if ($^O eq 'freebsd') {
if (S_ISREG($modes)) {
open(FILE, '>', $file) || return -$!;