1 2 3 4 5 6 7 8 9
#!/bin/sh if [[ $# -ne 1 ]]; then echo "Usage:" `basename $0` "pid" echo "Kill pid, provoking a crash dump." exit 0 fi echo 'p (int)printf(NULL)' | gdb --pid=$1