Opened 2 months ago
#19062 new bug
open() does not fail with ENOENT when it should
Reported by: | bhaible | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System/POSIX | Version: | R1/beta5 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
POSIX https://pubs.opengroup.org/onlinepubs/9799919799/functions/open.html specifies that the open() function "shall fail" with error code ENOENT if "O_CREAT is set and a component of the path prefix of path does not name an existing file".
This does not work in Haiku hrev57823 (from 2024-07-15): it fails with EINVAL instead.
How to reproduce: Compile and run the attached test program.
gcc -Wall foo.c ./a.out
Expected output:
ret = -1, errno == ENOENT OK
Actual output:
ret = -1, errno == Invalid Argument a.out: foo.c:31:main: errno == ENOENT Kill Thread
Attachments (1)
Note:
See TracTickets
for help on using tickets.
test case foo.c