nsxiv9707ca9
Fix autoreload-nop accidentally selecting on stdin
When sxiv is built with AUTORELOAD=nop if something is feed via stdin it will start to infinitely call select() leading to a 100% CPU usage. Thanks to @sdx23 for helping in analyzing that problem! Fixes issue #297.
+1 −1
1 file changed
- M autoreload_nop.c +1 −1
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | 21 | void arl_init(arl_t *arl) | |
| 22 | 22 | { | |
| 23 | − | (void) arl; | |
| 23 | + | arl->fd = -1; | |
| 24 | 24 | } | |
| 25 | 25 | ||
| 26 | 26 | void arl_cleanup(arl_t *arl) | |