3 ms·
That reminds me of Unix FDs and the distinction between whether your user has permission to write a file, and whether an open file is actually open-for-writing.
by frou_dh 10y ago
That reminds me of Unix FDs and the distinction between whether your user has permission to write a file, and whether an open file is actually open-for-writing. I was thankful to find out about fcntl(2) + F_GETFL, and get out of a 'dummy write' train of thought.
- dom0 10y agoFun-fact: In the POSIX model you cannot write into a private mapping created through a FD with the writable bit not set. (Or, more precisely, Linux won't let you set the write bit of the mapping). Even though that would be a rather useful thing to have, and wouldn't be hindered by hardware or kernel (which already does CoW of pages).