diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2024-02-02 17:18:05 +0300 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-02-09 19:17:20 +0300 |
commit | bf45c42c5fc90bf8d855cdf4e382aa29ba041fdb (patch) | |
tree | 11d600b3b587c8734fcf7c6969cb67062df3fbbe /vendor/github.com/golang/glog/glog.go | |
parent | e4284bb3757feda8fac79a07ed9d0a38cb2c28ca (diff) | |
download | ydb-bf45c42c5fc90bf8d855cdf4e382aa29ba041fdb.tar.gz |
Update vendor/go.opentelemetry.io/otel to 1.22.0
Diffstat (limited to 'vendor/github.com/golang/glog/glog.go')
-rw-r--r-- | vendor/github.com/golang/glog/glog.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/vendor/github.com/golang/glog/glog.go b/vendor/github.com/golang/glog/glog.go index e108ae8b4f..dd0ed10156 100644 --- a/vendor/github.com/golang/glog/glog.go +++ b/vendor/github.com/golang/glog/glog.go @@ -92,7 +92,6 @@ import ( "strconv" "sync" "sync/atomic" - "syscall" "time" "github.com/golang/glog/internal/logsink" @@ -524,34 +523,6 @@ func fatalf(depth int, format string, args ...any) { os.Exit(2) // Exit with the same code as the default SIGABRT handler. } -// abortProcess attempts to kill the current process in a way that will dump the -// currently-running goroutines someplace useful (Coroner or stderr). -// -// It does this by sending SIGABRT to the current process. Unfortunately, the -// signal may or may not be delivered to the current thread; in order to do that -// portably, we would need to add a cgo dependency and call pthread_kill. -// -// If successful, abortProcess does not return. -func abortProcess() error { - p, err := os.FindProcess(os.Getpid()) - if err != nil { - return err - } - if err := p.Signal(syscall.SIGABRT); err != nil { - return err - } - - // Sent the signal. Now we wait for it to arrive and any SIGABRT handlers to - // run (and eventually terminate the process themselves). - // - // We could just "select{}" here, but there's an outside chance that would - // trigger the runtime's deadlock detector if there happen not to be any - // background goroutines running. So we'll sleep a while first to give - // the signal some time. - time.Sleep(10 * time.Second) - select {} -} - // Fatal logs to the FATAL, ERROR, WARNING, and INFO logs, // including a stack trace of all running goroutines, then calls os.Exit(2). // Arguments are handled in the manner of fmt.Print; a newline is appended if missing. |