Bug 159226 - [libedit] [patch] libedit does not always restore its signal handler
Summary: [libedit] [patch] libedit does not always restore its signal handler
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.3-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2011-07-27 11:30 UTC by AIDA Shinra
Modified: 2021-09-22 09:25 UTC (History)
0 users

See Also:

libedit-multisignal.diff (685 bytes, patch)
2011-07-27 11:30 UTC, AIDA Shinra
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description AIDA Shinra 2011-07-27 11:30:08 UTC
If a program gets the same signal twice in a single call to el_gets(), editline's internal signal handler is not used to the second one.

Fix: Apply the attached patch.
How-To-Repeat: I found this bug when testing CURRENT's BSD bc.

You can also reproduce the problem by inserting "printf" or "write" to libedit's sig_handler() and run ftp(1).
Comment 1 Pedro F. Giffuni freebsd_committer 2012-07-02 20:53:15 UTC
It is likely that this bug was fixed by r237448,=0Awhich merged some update=
s from NetBSD, among them=0ACVS 1.13:=0A=0Ain order for read() to return EI=
NTR we need to use sigaction, not signal,=0Aotherwise SA_RESTART is set.=0A=
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:11 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Baptiste Daroussin freebsd_committer 2021-09-22 09:25:38 UTC
libedit has changed a lot since this bug report, I believe this is no more an issue, please reopen if I am wrong