Bug 159226

Summary: [libedit] [patch] libedit does not always restore its signal handler
Product: Base System Reporter: AIDA Shinra <shinra>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Overcome By Events    
Severity: Affects Only Me    
Priority: Normal    
Version: 7.3-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
libedit-multisignal.diff none

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=
=0Ahttp://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/sig.c.diff?r1=3D1.12=
&r2=3D1.13&only_with_tag=3DMAIN
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