3 ms·
> The main difference I know of is that file descriptors are sequential, while handles are random. Is it an API guarantee, or just an irrelevant implementation
by int_19h 9y ago
> The main difference I know of is that file descriptors are sequential, while handles are random.
Is it an API guarantee, or just an irrelevant implementation detail?
- cesarb 9y agoFor file descriptors, API guarantee, specified by POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_14 http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2... "[...] atomically allocate the lowest numbered available (that is, not already open in the calling process) file descriptor [...]"