Skip to content

Commit

Permalink
internal/crashmonitor: add the options parameter to the setCrashOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
Stavrospanakakis committed May 6, 2024
1 parent fe70498 commit ea995a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/crashmonitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ import (
// TODO(adonovan): eliminate once go1.23+ is assured.
func Supported() bool { return setCrashOutput != nil }

var setCrashOutput func(*os.File) error // = runtime.SetCrashOutput on go1.23+
var setCrashOutput func(*os.File, debug.CrashOptions) error // = runtime.SetCrashOutput on go1.23+

// Parent sets up the parent side of the crashmonitor. It requires
// exclusive use of a writable pipe connected to the child process's stdin.
func Parent(pipe *os.File) {
writeSentinel(pipe)
// Ensure that we get pc=0x%x values in the traceback.
debug.SetTraceback("system")
setCrashOutput(pipe)
setCrashOutput(pipe, debug.CrashOptions{})
}

// Child runs the part of the crashmonitor that runs in the child process.
Expand Down

0 comments on commit ea995a9

Please sign in to comment.