public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eli Carter <eli.carter@inet.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] core file naming option
Date: Tue, 25 Sep 2001 17:26:49 -0500	[thread overview]
Message-ID: <3BB104A9.3AD512A5@inet.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 784 bytes --]

Alan et. all,

The attached patch adds an option to the build to have core files named
core.processname, but defaulting to the current behaviour of course. 
For most people the single 'core' file is sufficient, but when the sky
is falling, it's nice to have more places for it to land.  :)
So, is this something that might go into the kernel, or are their
philisophical reasons against it?  (The patch is against 2.2.19.  I
haven't looked at 2.4.x yet.  Let me know if you want a 2.4 or if I
should send it to Linus, or...)

Questions, comments, etc. welcome,

Eli 
--------------------.     Real Users find the one combination of bizarre
Eli Carter           \ input values that shuts down the system for days.
eli.carter(a)inet.com `-------------------------------------------------

[-- Attachment #2: corefile.patch --]
[-- Type: text/plain, Size: 1429 bytes --]

diff -urN linux.orig/Documentation/Configure.help linux/Documentation/Configure.help
--- linux.orig/Documentation/Configure.help	Tue Sep 25 17:02:27 2001
+++ linux/Documentation/Configure.help	Tue Sep 25 16:54:23 2001
@@ -8765,6 +8765,12 @@
   from within Linux if you have also said Y to "UFS filesystem
   support", above.
 
+Long corefile names
+CONFIG_COREFILE_LONGNAME
+  If you say Y here, core files will be named 'core.[process]' where
+  '[process]' is the name of the process which dumped core.
+  Otherwise, they will be named 'core' by default.
+
 ADFS filesystem support (read only) (EXPERIMENTAL)
 CONFIG_ADFS_FS
   The Acorn Disc Filing System is the standard filesystem of the
diff -urN linux.orig/fs/Config.in linux/fs/Config.in
--- linux.orig/fs/Config.in	Tue Sep 25 17:02:34 2001
+++ linux/fs/Config.in	Tue Sep 25 16:53:08 2001
@@ -6,6 +6,7 @@
 
 bool	 'Quota support' CONFIG_QUOTA
 tristate 'Kernel automounter support' CONFIG_AUTOFS_FS
+bool     'Long corefile names' CONFIG_COREFILE_LONGNAME
 
 
 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
diff -urN linux.orig/fs/binfmt_elf.c linux/fs/binfmt_elf.c
--- linux.orig/fs/binfmt_elf.c	Tue Sep 25 17:02:34 2001
+++ linux/fs/binfmt_elf.c	Tue Sep 25 16:53:08 2001
@@ -1140,7 +1140,7 @@
 	set_fs(KERNEL_DS);
 
 	memcpy(corefile,"core.",5);
-#if 0
+#ifdef CONFIG_COREFILE_LONGNAME
 	memcpy(corefile+5,current->comm,sizeof(current->comm));
 #else
 	corefile[4] = '\0';

             reply	other threads:[~2001-09-25 22:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-25 22:26 Eli Carter [this message]
2001-09-26 11:30 ` [PATCH] core file naming option Padraig Brady
2001-09-26 16:22   ` Alan Cox
2001-09-26 17:23     ` Eli Carter
2001-09-28 18:34       ` n0ano
2001-09-28 19:54         ` Eli Carter
2001-09-27 16:17 ` bill davidsen
2001-09-27 17:09   ` Eli Carter
  -- strict thread matches above, loose matches on Subject: below --
2001-10-08 21:32 Phil Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BB104A9.3AD512A5@inet.com \
    --to=eli.carter@inet.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox