File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 7
7
8
8
package crashmonitor
9
9
10
- import "runtime/debug"
10
+ import (
11
+ "os"
12
+ "runtime/debug"
13
+ )
11
14
12
15
func init () {
13
- setCrashOutput = debug .SetCrashOutput
16
+ setCrashOutput = func (f * os.File ) error {
17
+ return debug .SetCrashOutput (f )
18
+ }
14
19
}
Original file line number Diff line number Diff line change @@ -26,15 +26,15 @@ import (
26
26
// TODO(adonovan): eliminate once go1.23+ is assured.
27
27
func Supported () bool { return setCrashOutput != nil }
28
28
29
- var setCrashOutput func (* os.File , debug. CrashOptions ) error // = runtime.SetCrashOutput on go1.23+
29
+ var setCrashOutput func (* os.File ) error // = runtime.SetCrashOutput on go1.23+
30
30
31
31
// Parent sets up the parent side of the crashmonitor. It requires
32
32
// exclusive use of a writable pipe connected to the child process's stdin.
33
33
func Parent (pipe * os.File ) {
34
34
writeSentinel (pipe )
35
35
// Ensure that we get pc=0x%x values in the traceback.
36
36
debug .SetTraceback ("system" )
37
- setCrashOutput (pipe , debug. CrashOptions {} )
37
+ setCrashOutput (pipe )
38
38
}
39
39
40
40
// Child runs the part of the crashmonitor that runs in the child process.
You can’t perform that action at this time.
0 commit comments