#19062 closed bug (fixed)
open() does not fail with ENOENT when it should
Reported by: | bhaible | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta6 |
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)
Change History (4)
by , 4 months ago
comment:2 by , 3 weeks ago
Milestone: | Unscheduled → R1/beta6 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fix merged in hrev58376.
Note:
See TracTickets
for help on using tickets.
test case foo.c