mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
ddfa448536
Currently when libnetwork tests are run inside a container you cannot interrupt them in the middle by pressing ctrl-c even though all the tests run in foreground. Fix this by running tests by wrapping the make invocation inside the container with a shell scripts which installs the SIGINT handler. Without the handler the kernel does not deliver signals to the process with PID 1(which in this case was make itself) and hence make could never be interrupted. With this fix we capture SIGINT in the shell script and re-raise it in the the child process (which is make) and that makes the make interruptible. Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
11 lines
101 B
Bash
Executable file
11 lines
101 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
function raise()
|
|
{
|
|
kill -$1 0
|
|
}
|
|
|
|
trap "raise SIGINT" SIGINT
|
|
make $1
|