From owner-svn-src-all@FreeBSD.ORG Tue Aug 21 21:46:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EB491065674; Tue, 21 Aug 2012 21:46:44 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89D978FC23; Tue, 21 Aug 2012 21:46:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LLkiuB012031; Tue, 21 Aug 2012 21:46:44 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LLkiBl012029; Tue, 21 Aug 2012 21:46:44 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201208212146.q7LLkiBl012029@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 21 Aug 2012 21:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239543 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 21:46:44 -0000 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)