Timeline for What is interrupted system call?
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 29, 2019 at 12:44 | vote | accept | Rick | ||
| Mar 29, 2019 at 12:48 | |||||
| Mar 29, 2019 at 10:23 | comment | added | user313992 | OK, I removed the "regular file" stuff, since it may be incorrect. But then, where does the need for write() to return -1/EINTR stem from ;-) ? | |
| Mar 29, 2019 at 10:20 | history | edited | user313992 | CC BY-SA 4.0 |
remove dubious stuff until I find a better to express to idea
|
| Mar 29, 2019 at 9:25 | comment | added | Johan Myréen |
Reading a regular file even from a very fast SSD does block if the data to be read can't be found in cache in RAM. The behaviour does not depend on whether the file is regular or not, but it is all up to the device. If the device can't respond immediately and the process needs to wait for DMA and interrupts to complete, then the process is rescheduled and the system call blocks. The need for read to return EINTR if no data is yet available stems from the special semantics of a zero return, which normally means end of file.
|
|
| Mar 29, 2019 at 8:43 | history | edited | user313992 | CC BY-SA 4.0 |
added 235 characters in body
|
| Mar 29, 2019 at 8:29 | history | answered | user313992 | CC BY-SA 4.0 |