gdbscript

1stMUD/corefiles/gdbscript · 436 B

From the archive 1stMud.tar.gz.1

Download the archive   « Back to the archive contents

#!/bin/bash

if [ -e ../area/core ]; then

EMAIL=""
COUNT=`cat ../corefiles/.crashcount`
let COUNT=$COUNT+1
if [ $COUNT -ge 101 ]; then
COUNT=1
fi
echo $COUNT > ../corefiles/.crashcount
DATE=`date +"%a %b %d %T %Y"`

sleep 5
gdb -batch ../bin/dlm ../area/core | head -1000 | mailx -s "Coredump $COUNT: $DATE" $EMAIL

mv ../area/core ../corefiles/$COUNT.core

if [ ! -f ../corefiles/rom ]; then
ln -s ../src/rom ../corefiles/rom
fi

fi

Site Stats

Snippets: 1791
Codebases: 571