From: Ben Pfaff Date: Fri, 28 Aug 2009 20:05:48 +0000 (-0700) Subject: corekeeper: Always include PID in core dump names. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c4fae5f4563848dd6392434424e10e32e6b6f83;p=openvswitch corekeeper: Always include PID in core dump names. Some distributions automatically set /proc/sys/kernel/core_uses_pid to 1 and others leave it at its default setting of 0. That means that, with the core_pattern that corekeeper was setting, on the former distributions the PID would be included in core names and on the latter the PID would be omitted. For consistency, this commit forces the PID to be in the core file name in either case (note that putting %p in core_pattern causes the core_uses_pid setting to be disregarded). CC: Martin Casado --- diff --git a/debian/corekeeper.init b/debian/corekeeper.init index 27d62a12..d820b028 100755 --- a/debian/corekeeper.init +++ b/debian/corekeeper.init @@ -6,6 +6,7 @@ # adjust it to the program you want to run. # # Copyright (c) 2007 Javier Fernandez-Sanguino +# Copyright (c) 2009 Nicira Networks, Inc. # # This is free software; you may redistribute it and/or modify # it under the terms of the GNU General Public License as @@ -42,7 +43,7 @@ set -e case "$1" in start) log_daemon_msg "Initializing core dump location..." - if echo "/var/log/core/core.%e.%t" > /proc/sys/kernel/core_pattern + if echo "/var/log/core/core.%e.%t.%p" > /proc/sys/kernel/core_pattern then log_progress_msg "success" log_end_msg 0