mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Log message sent before logging is setup
Moved log message to after the log options have been read and log setup. PiperOrigin-RevId: 264964171
This commit is contained in:
committed by
gVisor bot
parent
761e4bf2fe
commit
f225fdbbe7
+7
-7
@@ -117,13 +117,6 @@ 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.
|
||||
@@ -265,6 +258,13 @@ func main() {
|
||||
log.Infof("\t\tStrace: %t, max size: %d, syscalls: %s", conf.Strace, conf.StraceLogSize, conf.StraceSyscalls)
|
||||
log.Infof("***************************")
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
// Call the subcommand and pass in the configuration.
|
||||
var ws syscall.WaitStatus
|
||||
subcmdCode := subcommands.Execute(context.Background(), conf, &ws)
|
||||
|
||||
Reference in New Issue
Block a user