Date: Wed, 11 Jul 2012 22:17:59 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r238377 - head/bin/sh Message-ID: <201207112217.q6BMHxXn068093@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207112217.q6BMHxXn068093>