Commit 77c5b01
authored
Retry pselect on EINTR (#344)
The Go runtime may send signals to pause goroutines and these signals
can interrupt pselect6. When this happens, the syscall returns EINTR.
This change handles that case by retrying pselect6 on EINTR. The same
approach is used by the mdlayher/socket library for sendmsg/recvmsg
operations:
https://github.com/mdlayher/socket/blob/8e6558649a7bd11ca1bd2b82c45fc96dee4dc11d/conn.go#L871.1 parent 35f95ac commit 77c5b01
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
38 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
39 | 48 | | |
0 commit comments