Commit 27a323f
committed
sss: mark closed fds as -1 in poll array
When a pin's file descriptor is closed after reading, it must be removed
from the poll set. Unlike epoll (which automatically removes closed fds),
poll() will return immediately with POLLNVAL for closed fds, creating an
infinite loop since we only check for POLLIN/POLLPRI.
Setting the fd to -1 causes poll() to ignore it, matching epoll behavior.1 parent 726fcdc commit 27a323f
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
230 | 244 | | |
231 | 245 | | |
232 | 246 | | |
| |||
260 | 274 | | |
261 | 275 | | |
262 | 276 | | |
| 277 | + | |
| 278 | + | |
263 | 279 | | |
264 | 280 | | |
265 | 281 | | |
| |||
0 commit comments