Fix fuzz/run-clang.sh for CTRL-C

This commit is contained in:
Tim Rühsen 2017-07-02 21:23:10 +02:00
parent f2b9b2447a
commit 49c9fade7a
1 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh -e
#!/bin/bash -e
#
# Copyright(c) 2017 Tim Ruehsen
#
@ -22,6 +22,15 @@
#
# This file is part of libpsl.
trap ctrl_c INT
ctrl_c() {
if test -n "$sudo"; then
./${fuzzer} -merge=1 ${fuzzer}.in ${fuzzer}.new
rm -rf ${fuzzer}.new
fi
}
if test -z "$1"; then
echo "Usage: $0 <fuzzer target>"
echo "Example: $0 libpsl_fuzzer"