handle coredumps

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@185 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
mheily 2010-02-06 01:43:17 +00:00
parent c2fd7ff1e5
commit 20ca86b012
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
CFLAGS=-I../../include
CFLAGS=-I../../include -O0 -g
LDADD=-lpthread
PROGRAM=stresstest
SOURCES=main.c ../timer.c ../user.c ../kevent.c ../read.c ../vnode.c ../test.c
@ -9,14 +9,16 @@ $(PROGRAM): $(SOURCES)
$(CC) -o $(PROGRAM) $(CFLAGS) $(SOURCES) ../../libkqueue.a $(LDADD)
check: $(PROGRAM)
ulimit -c 999999 ; ./$(PROGRAM)
rm -f core 2>/dev/null
ulimit -c 999999 ; ./$(PROGRAM) || true
if [ -f core ] ; then gdb ./$(PROGRAM) core ; fi
valgrind: $(PROGRAM)
valgrind --tool=memcheck --leak-check=full --show-reachable=yes \
--num-callers=20 --track-fds=yes ./$(PROGRAM)
clean:
rm -f $(PROGRAM) *.o
rm -f $(PROGRAM) core *.o
edit:
ctags $(SOURCES)

View File

@ -14,6 +14,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../config.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>