From owner-svn-src-head@FreeBSD.ORG Fri Mar 13 04:26:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B340ECE1; Fri, 13 Mar 2015 04:26:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EAA8369; Fri, 13 Mar 2015 04:26:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2D4QnMR031412; Fri, 13 Mar 2015 04:26:49 GMT (envelope-from stas@FreeBSD.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2D4Qnwu031411; Fri, 13 Mar 2015 04:26:49 GMT (envelope-from stas@FreeBSD.org) Message-Id: <201503130426.t2D4Qnwu031411@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: stas set sender to stas@FreeBSD.org using -f From: Stanislav Sedov Date: Fri, 13 Mar 2015 04:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279946 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2015 04:26:49 -0000 Author: stas Date: Fri Mar 13 04:26:48 2015 New Revision: 279946 URL: https://svnweb.freebsd.org/changeset/base/279946 Log: Fix debug symbols loading in libproc: 0 is a valid file descriptor. Reported by: Chris Torek Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Fri Mar 13 02:54:46 2015 (r279945) +++ head/lib/libproc/proc_sym.c Fri Mar 13 04:26:48 2015 (r279946) @@ -91,7 +91,7 @@ find_dbg_obj(const char *path) snprintf(dbg_path, sizeof(dbg_path), "/usr/lib/debug/%s.debug", path); fd = open(dbg_path, O_RDONLY); - if (fd > 0) + if (fd >= 0) return (fd); else return (open(path, O_RDONLY));