Closed sol closed 11 months ago
I guess that's right.
But mkstemp(3)
does not open existing files, it only creates new files in directories, and its documentation on both Fedora 36 and FreeBSD 12 makes no mention of EINTR. It uses open with O_CREAT|O_EXCL
, so not subject to blocking opening FIFOs, or similar.
I am not convinced this change is needed. It is unclear that we really should be retrying on a caught signal in this case. Barring a specific use-case that motivates the change, I'd hold off on fixing behaviour that isn't clearly broken.
If there are no objections, we should close this issue as "Won't Fix".
https://github.com/haskell/unix/blob/dc91c94e6231ca7ac9ae0214956b30089b6b0def/System/Posix/Temp/PosixString.hsc#L65 Should this be
throwErrnoIfMinus1Retry
?mkstemp
can fail with the same errors asopen
, which in turn can fail withEINTR
. The man pages say that this can happen for "... slow device (e.g., a FIFO ...". So maybe we are good, not sure.