From owner-svn-src-user@FreeBSD.ORG Thu Oct 16 10:40:07 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC7061065688; Thu, 16 Oct 2008 10:40:07 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BCF48FC1D; Thu, 16 Oct 2008 10:40:07 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9GAe7GW058303; Thu, 16 Oct 2008 10:40:07 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9GAe7nb058302; Thu, 16 Oct 2008 10:40:07 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <200810161040.m9GAe7nb058302@svn.freebsd.org> From: Alexander Leidinger Date: Thu, 16 Oct 2008 10:40:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183942 - user/netchild/misc/src/sys/kern X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2008 10:40:07 -0000 Author: netchild Date: Thu Oct 16 10:40:07 2008 New Revision: 183942 URL: http://svn.freebsd.org/changeset/base/183942 Log: Log the time of a segfault. If you don't have a syslog.conf which logs such info messages to a file, there's no trace of when this happened. With this change you at least have the possibility to grab the time from the console and try to correlate this with other things. Modified: user/netchild/misc/src/sys/kern/kern_sig.c Modified: user/netchild/misc/src/sys/kern/kern_sig.c ============================================================================== --- user/netchild/misc/src/sys/kern/kern_sig.c Thu Oct 16 10:36:47 2008 (r183941) +++ user/netchild/misc/src/sys/kern/kern_sig.c Thu Oct 16 10:40:07 2008 (r183942) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2718,13 +2719,18 @@ sigexit(td, sig) */ if (coredump(td) == 0) sig |= WCOREFLAG; - if (kern_logsigexit) + if (kern_logsigexit) { + struct bintime now; + + getbintime(&now); log(LOG_INFO, - "pid %d (%s), uid %d: exited on signal %d%s\n", + "%zd: pid %d (%s), uid %d: exited on signal %d%s\n", + now.sec, p->p_pid, p->p_comm, td->td_ucred ? td->td_ucred->cr_uid : -1, sig &~ WCOREFLAG, sig & WCOREFLAG ? " (core dumped)" : ""); + } } else PROC_UNLOCK(p); exit1(td, W_EXITCODE(0, sig));