Closed horrad closed 6 months ago
@horrad Please put what you wrote in the PR description in the commit message body as well.
@horrad Please put what you wrote in the PR description in the commit message body as well. Done.
Can you please make the patch BSD-specific?
I think it's best we avoid adding unnecessary #ifdef
s. open(2)
says:
The argument flags must include one of the following access modes: O_RDONLY, O_WRONLY, or O_RDWR.
We have none of those.
Makes sense. Merged. Thanks!
On OpenBSD at least one of O_RDONLY, O_WRONLY or O_RDWR is needed to open a file.
In creating a new file none of those is set, which leads to an EINVAL error ("invalid argument").
Since the new file is only created and never read, I chose to use O_WRONLY.