Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2012 21:46:44 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r239543 - stable/8/bin/sh
Message-ID:  <201208212146.q7LLkiBl012029@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Tue Aug 21 21:46:44 2012
New Revision: 239543
URL: http://svn.freebsd.org/changeset/base/239543

Log:
  MFC	r238377:
  
  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

Modified:
  stable/8/bin/sh/input.c
Directory Properties:
  stable/8/bin/sh/   (props changed)

Modified: stable/8/bin/sh/input.c
==============================================================================
--- stable/8/bin/sh/input.c	Tue Aug 21 21:46:01 2012	(r239542)
+++ stable/8/bin/sh/input.c	Tue Aug 21 21:46:44 2012	(r239543)
@@ -190,7 +190,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 - 1)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208212146.q7LLkiBl012029>