Opened 3 months ago
Closed 3 months ago
#19061 closed bug (duplicate)
mkdirat() does not fail with EBADF when it should
Reported by: | bhaible | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System/POSIX | Version: | R1/beta5 |
Keywords: | Cc: | ||
Blocked By: | #19048 | Blocking: | |
Platform: | All |
Description
POSIX https://pubs.opengroup.org/onlinepubs/9799919799/functions/mkdir.html specifies that the mkdirat() function "shall fail" with error code EBADF if "The path argument does not specify an absolute path and the fd argument is neither AT_FDCWD nor a valid file descriptor open for reading or searching."
This does not work in Haiku hrev57823 (from 2024-07-15): it succeeds (creating a directory!) instead.
How to reproduce: Compile and run the attached test program.
gcc -Wall foo.c rm -f foo ./a.out
Expected output:
ret = -1, errno == EBADF OK
Actual output:
ret = 0 a.out: foo.c:21:main: ret < 0 && errno == EBADF Kill Thread
Attachments (1)
Change History (2)
by , 3 months ago
comment:1 by , 3 months ago
Blocked By: | 19048 added |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
test case foo.c