24 lines
383 B
Bash
Executable File
24 lines
383 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
START=70
|
|
STOP=01
|
|
|
|
start() {
|
|
[ -e /proc/sys/kernel/core_pattern -a -e /usr/bin/coredump.sh ] && {
|
|
echo "|/bin/ash /usr/bin/coredump.sh %p %s %e %c" > /proc/sys/kernel/core_pattern
|
|
}
|
|
echo 1 > /proc/sys/kernel/print-fatal-signals
|
|
return 0
|
|
}
|
|
|
|
stop() {
|
|
touch /tmp/skip_core
|
|
return 0
|
|
}
|
|
|
|
demo() {
|
|
ulimit -c unlimited
|
|
/bin/sleep 100 &
|
|
kill -SIGSEGV %%
|
|
}
|