Commit 76676247 authored by Krzysztof Leśniak's avatar Krzysztof Leśniak
Browse files

Do not use kill(0, ...)

kill(3) says (https://linux.die.net/man/3/kill):

> If pid is 0, sig shall be sent to all processes (excluding an
> unspecified set of system processes) whose process group ID is equal to
> the process group ID of the sender, and for which the process has
> permission to send a signal.

When testing, hived is spawned by pytest. This means they're likely to
share the same process group id. This means that when hived executes
kill(0, SIGINT), the interrupt is also send to pytest, which kills the
runner.

To fix this, send signal only to ourselves, by using kill(getpid(), ...)
parent bf853054
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment