Document the constraints on path_open's returned file descriptor.
Whether the downsides in POSIX and existing application compatibility outweigh the benefits of thread safety remains an open question. Right now, this note is just documenting the current behavior.
This commit is contained in:
@@ -744,6 +744,12 @@ Inputs:
|
||||
|
||||
Open a file or directory.
|
||||
|
||||
The returned file descriptor is not guaranteed to be the lowest-numbered
|
||||
file descriptor not currently open; it is randomized to prevent
|
||||
applications from depending on making assumptions about indexes, since
|
||||
this is error-prone in multi-threaded contexts. The returned file
|
||||
descriptor is guaranteed to be less than 2<sup>31</sup>.
|
||||
|
||||
Note: This is similar to `openat` in POSIX.
|
||||
|
||||
Inputs:
|
||||
|
||||
Reference in New Issue
Block a user