-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This was broken by the macOS fix because apparently, editline acts differently on those platforms. I have tested that Linux, macOS, and FreeBSD all work with this one, both SIGWINCH and Ctrl+D. Well, Ctrl+D doesn't work on macOS, but that is actually a limitation I *can't* get around. Fixes FreeBSD being broken by 56bb182. Signed-off-by: Gavin D. Howard <[email protected]>
- Loading branch information
1 parent
c5b7724
commit 89d6c34
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89d6c34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug is in bc, not in macOS. You are calling
el_resize()
from a signal handler, which isn't supported. The solution is to revert this and 56bb182, remove any mention ofSIGWINCH
in bc, and instead add the following line in an appropriate location inbc_history_init()
:This will make libedit handle
SIGWINCH
on its own and everything will be fine.Edit: see #86.
89d6c34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment on #86; your solution will not work for
bc
, unfortunately.