Allow core dumping via a fifo
Subsystems (2)
PATCH 1/1 Allow core dumping via a fifo
Solaris doesn't mind if ./core is a fifo; it happily dumps core through the fifo. (Or so I've heard.)
Here's a patch to 2.4.9 that gives Linux this same ability. To test it, try
mkfifo core
cat core > core2 &
cat
(hit ^\ to force a core dump in 2nd cat)
You should have a usable core file in 'core2'.
This is only my second patch ever, so be kind... I'm sure there's something wrong with it, somewhere, but it did seem to work in my quick tests.
This is also a preliminary step towards what I described in my earlier post today ("remote core dumping").
- Dan
fs/exec.c renamed from fs/exec.c.orig +1 -1
@@ -954,7 +954,7 @@if (d_unhashed (file->f_dentry)) goto close_fail; -if (!S_ISREG (inode->i_mode)) +if (!S_ISREG (inode->i_mode) && !S_ISFIFO (inode->i_mode)) goto close_fail;if (!file->f_op) goto close_fail;
fs/binfmt_elf.c renamed from fs/binfmt_elf.c.orig +57 -20
148 lines not on this page · raw message