Fix ^\ handling with readline, without breaking ^D handling with readline. #116
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Re-)fixes #111. The problem with the first fix attempt in #113 is that it changed the code that calls
callreadline()
from thinking aNULL
return value always means EOF to thinking it never does. In fact, it sometimes does! So this version is a little more nuanced, only settingerrno = EINTR
incallreadline()
when a signal has interrupted things.I will be less hasty this time and not submit this myself, even though I think it's a fairly uncontroversial bug fix ("surely this time it'll work...")
As an aside, I kind of think
/signame
should actually justSIG_IGN
the signal in the local process and re-set it toSIG_DFL
insetsigdefaults()
. Seems like the most straightforward thing, and no more racey than the other signal behaviors already being handled bysetsigdefaults()
. It also (seems to) match bash and tcsh on my machine, but interestingly shells seem pretty diverse in what they actually do on signals at the prompt.