CVSROOT:        /cvs
Module name:    src
Changes by:     mart...@cvs.openbsd.org 2021/08/11 09:13:46

Modified files:
        lib/libedit    : read.c 

Log message:
Only enter the sig_no switch if we actually return from read(2) with
errno == EINTR. There was a race here where read(2) can return with a
different errno, but the signal handler enters between the read return and
the switch, which could result in handling a signal, while we should be
handling the error.

This fix assumes that signal handlers don't clobber our errno, but doing
that would open a whole other can of worms.

OK schwarze@, millert@

Reply via email to