Notes |
(0003753)
shware_systems (reporter)
2017-06-06 12:14
|
While this looks reasonable, the restriction on pread() and pwrite() of not disturbing the seek position is problematic. It means an effective dup();lseek();read() or write();close() sequence occurs on each invoke. While each of these operations is supposed to be asynch-safe, how they're combined, or implemented otherwise internally, may not be; so requiring this could break existing implementations. If the routines use malloc() to get space for temporary descriptors or buffers, as example, this would make the entire routine unsafe, since malloc() is also not in the safe list. |
|
(0003754)
geoffclare (manager)
2017-06-06 13:48
|
The standard already requires pread() and pwrite() to be async-signal-safe. The fact that they are missing from the list in 2.4.3 is simply an editorial omission (and Daniel correctly classified this bug as such).
This is because the description of pread() says "The pread() function shall be equivalent to read(), except that it shall read from a given position in the file without changing the file offset."
In order for pread() not to be required to be async-signal-safe, the standard would instead have to say "The pread() function shall be equivalent to read(), except that it shall read from a given position in the file without changing the file offset and it need not be async-signal-safe."
Likewise for pwrite(). |
|
(0003757)
dancol (reporter)
2017-06-10 02:13
|
shware_systems, in practice, pread and pwrite are direct system calls, so there are no particular userspace constraints preventing trivially (by definition) making these calls async-signal-safe.
geoffclare, do you plan to change the standard to fix this omission? Is there anything you need me to do? |
|
(0003759)
geoffclare (manager)
2017-06-12 09:18
|
dancol, when this bug is reached in the weekly teleconferences, I expect that your proposed change will be accepted. There is nothing more you need to do. |
|
(0004059)
dancol (reporter)
2018-07-24 17:53
|
Ping? |
|
(0004060)
geoffclare (manager)
2018-07-25 08:44
|
The weekly teleconferences have reached bug 1118, so a little way to go yet before this one gets its turn. |
|