Open mitchellwrosen opened 6 years ago
https://github.com/nsf/termbox/blob/bbb64e9da7c5590dc7657eb1bece562089656dc1/src/termbox.c#L653-L655
select returns -1 on error, which is never checked. This makes the function unresponsive to OS signals (EINTR), among other things.
select
i guess a patch/PR would be helpful.
Any reason why a simple if(result==SIG_ERR) return 0; didnt made it in yet, or shall i do that one? ^^
if(result==SIG_ERR) return 0;
SIG_ERR isn't the check.
if (result == -1 && errno == EINTR) ...
https://github.com/nsf/termbox/blob/bbb64e9da7c5590dc7657eb1bece562089656dc1/src/termbox.c#L653-L655
select
returns -1 on error, which is never checked. This makes the function unresponsive to OS signals (EINTR), among other things.