diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-08-13 19:05:09 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-08-13 19:05:09 +0000 |
commit | 92d492e8e71f1348108bd91598ae6b4de73e3832 (patch) | |
tree | 097940d9ef3c3bfc76099505a25a5340219b6afc /runsc/main.go | |
parent | 3b7346145bcb48b8fb648e9b598ab3350002a754 (diff) | |
parent | 8d97b22aa8e565ff05c5e9209f13d2394e9706c8 (diff) |
Merge 8d97b22a (automated)
Diffstat (limited to 'runsc/main.go')
-rw-r--r-- | runsc/main.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runsc/main.go b/runsc/main.go index 5823819f4..e864118b2 100644 --- a/runsc/main.go +++ b/runsc/main.go @@ -22,6 +22,7 @@ import ( "io" "io/ioutil" "os" + "os/signal" "path/filepath" "strings" "syscall" @@ -116,6 +117,13 @@ func main() { // All subcommands must be registered before flag parsing. flag.Parse() + if *testOnlyAllowRunAsCurrentUserWithoutChroot { + // SIGTERM is sent to all processes if a test exceeds its + // timeout and this case is handled by syscall_test_runner. + log.Warningf("Block the TERM signal. This is only safe in tests!") + signal.Ignore(syscall.SIGTERM) + } + // Are we showing the version? if *showVersion { // The format here is the same as runc. |