svn commit: r238377 - head/bin/sh
Pedro F. Giffuni
pfg at FreeBSD.org
Wed Jul 11 22:17:59 UTC 2012
Author: pfg
Date: Wed Jul 11 22:17:58 2012
New Revision: 238377
URL: http://svn.freebsd.org/changeset/base/238377
Log:
Merge libedit adjustment from NetBSD.
On recent versions of NetBSD's libedit, el_gets
now sets el_len to -1 on error so we can
distinguish between a NULL string and an error.
This fixes sh from exiting with newer versions
of libedit now allowing EINTR to return.
Obtained from: NetBSD
Reviewed by: jilles
MFC after: 3 weeks
Modified:
head/bin/sh/input.c
Modified: head/bin/sh/input.c
==============================================================================
--- head/bin/sh/input.c Wed Jul 11 20:17:14 2012 (r238376)
+++ head/bin/sh/input.c Wed Jul 11 22:17:58 2012 (r238377)
@@ -186,7 +186,7 @@ retry:
if (rl_cp == NULL)
rl_cp = el_gets(el, &el_len);
if (rl_cp == NULL)
- nr = 0;
+ nr = el_len == 0 ? 0 : -1;
else {
nr = el_len;
if (nr > BUFSIZ)
More information about the svn-src-head
mailing list