Mercurial > dropbear
diff fuzz/fuzz-wrapfd.c @ 1791:685b47d8faf7
fuzz: wrap kill()
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 29 Jan 2021 21:47:56 +0800 |
parents | 97ad26e397a5 |
children | 19b28d2fbe30 |
line wrap: on
line diff
--- a/fuzz/fuzz-wrapfd.c Wed Feb 15 13:53:04 2017 +0100 +++ b/fuzz/fuzz-wrapfd.c Fri Jan 29 21:47:56 2021 +0800 @@ -258,3 +258,15 @@ return ret; } +int fuzz_kill(pid_t pid, int sig) { + if (fuzz.fuzzing) { + TRACE(("fuzz_kill ignoring pid %d signal %d", (pid), sig)) + if (sig >= 0) { + return 0; + } else { + errno = EINVAL; + return -1; + } + } + return kill(pid, sig); +}