[DragonFlyBSD - Bug #3282] unexpected errno value from fopen()
tuxillo
bugtracker-admin at leaf.dragonflybsd.org
Fri Nov 6 15:50:24 PST 2026
Issue #3282 has been updated by tuxillo.
This breaks tar at the very least in 6.4:
(cd prev-gcc/include-fixed; tar -cf - .) | (cd gcc/include-fixed; tar xpf -)
./: Can't remove already-existing dir: Invalid argument
tar: Error exit delayed from previous errors.
gmake[4]: *** [Makefile:3999: real-install-headers-tar] Error 1
----------------------------------------
Bug #3282: unexpected errno value from fopen()
http://bugs.dragonflybsd.org/issues/3282#change-14939
* Author: bhaible
* Status: In Progress
* Priority: Normal
* Category: Kernel
* Target version: 6.4
* Start date: 2021-06-14
----------------------------------------
fopen(".", "w") fails with errno = EEXIST.
Per POSIX https://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html
one would expect one of EISDIR, EINVAL, EACCES.
How to reproduce: Run this program.
<pre>
#include <errno.h>
#include <stdio.h>
int main ()
{
FILE *fp = fopen (".", "w");
if (fp == NULL)
{
perror ("fopen");
}
}
</pre>
---Files--------------------------------
sys.kern.vfs_nlookup.c.diff (6.7 KB)
0001-kernel-Fix-fopen-w-to-return-EISDIR-keep-mkdir-EEXIST-master.patch (2.97 KB)
0001-kernel-Fix-fopen-w-to-return-EISDIR-keep-mkdir-EEXIST-rel64.patch (2.97 KB)
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list