If start_server() fails, then pid will end up with -1 and cleanup() will do kill(-1, SIGKILL), which kills everything this process can kill. Change the test to kill pid (child) only when it successfully creates one. Signed-off-by: Jan Stancek --- testcases/kernel/syscalls/recvmsg/recvmsg01.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)