diff -u aio-2.4.5-ac9/fs/exec.c.sav aio-2.4.5-ac9/fs/exec.c
--- aio-2.4.5-ac9/fs/exec.c.sav	Wed Jun 13 16:54:35 2001
+++ aio-2.4.5-ac9/fs/exec.c	Thu Jun 14 15:16:36 2001
@@ -45,6 +45,8 @@
 #include <linux/kmod.h>
 #endif
 
+int core_uses_pid;
+
 static struct linux_binfmt *formats;
 static rwlock_t binfmt_lock = RW_LOCK_UNLOCKED;
 
@@ -941,12 +943,8 @@
 		goto fail;
 
 	memcpy(corename,"core.", 5);
-#if 0
-	memcpy(corename+5,current->comm,sizeof(current->comm));
-#else
 	corename[4] = '\0';
-#endif
- 	if (atomic_read(&current->mm->mm_users) != 1)
+ 	if (core_uses_pid || atomic_read(&current->mm->mm_users) != 1)
  		sprintf(&corename[4], ".%d", current->pid);
 	file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600);
 	if (IS_ERR(file))
diff -u aio-2.4.5-ac9/kernel/sysctl.c.sav aio-2.4.5-ac9/kernel/sysctl.c
--- aio-2.4.5-ac9/kernel/sysctl.c.sav	Wed Jun 13 16:54:38 2001
+++ aio-2.4.5-ac9/kernel/sysctl.c	Thu Jun 14 15:19:31 2001
@@ -47,6 +47,7 @@
 extern int max_threads;
 extern int nr_queued_signals, max_queued_signals;
 extern int sysrq_enabled;
+extern int core_uses_pid;
 
 /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
 static int maxolduid = 65535;
@@ -165,6 +166,8 @@
 	{KERN_DOMAINNAME, "domainname", system_utsname.domainname, 64,
 	 0644, NULL, &proc_doutsstring, &sysctl_string},
 	{KERN_PANIC, "panic", &panic_timeout, sizeof(int),
+	 0644, NULL, &proc_dointvec},
+	{KERN_CORE_USES_PID, "core_uses_pid", &core_uses_pid, sizeof(int),
 	 0644, NULL, &proc_dointvec},
 	{KERN_CAP_BSET, "cap-bound", &cap_bset, sizeof(kernel_cap_t),
 	 0600, NULL, &proc_dointvec_bset},
diff -u aio-2.4.5-ac9/include/linux/sysctl.h.sav aio-2.4.5-ac9/include/linux/sysctl.h
--- aio-2.4.5-ac9/include/linux/sysctl.h.sav	Wed Jun 13 17:10:34 2001
+++ aio-2.4.5-ac9/include/linux/sysctl.h	Thu Jun 14 15:21:17 2001
@@ -118,7 +118,8 @@
 	KERN_SHMPATH=48,	/* string: path to shm fs */
 	KERN_HOTPLUG=49,	/* string: path to hotplug policy agent */
 	KERN_IEEE_EMULATION_WARNINGS=50, /* int: unimplemented ieee instructions */
-	KERN_S390_USER_DEBUG_LOGGING=51  /* int: dumps of user faults */
+	KERN_S390_USER_DEBUG_LOGGING=51,  /* int: dumps of user faults */
+	KERN_CORE_USES_PID=52,		/* int: use core or core.%pid */
 };
 
 
