Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for SetCrashOutput (0.31 sec)

  1. src/runtime/debug/stack.go

    	/* for future expansion */
    }
    
    // SetCrashOutput configures a single additional file where unhandled
    // panics and other fatal errors are printed, in addition to standard error.
    // There is only one additional file: calling SetCrashOutput again overrides
    // any earlier call.
    // SetCrashOutput duplicates f's file descriptor, so the caller may safely
    // close f as soon as SetCrashOutput returns.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:19:04 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/telemetry/internal/crashmonitor/crash_go123.go

    // license that can be found in the LICENSE file.
    
    //go:build go1.23
    // +build go1.23
    
    package crashmonitor
    
    import (
    	"os"
    	"runtime/debug"
    )
    
    func init() {
    	setCrashOutput = func(f *os.File) error { return debug.SetCrashOutput(f, debug.CrashOptions{}) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:32:04 UTC 2024
    - 367 bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/telemetry/internal/crashmonitor/monitor.go

    	"strings"
    
    	"golang.org/x/telemetry/internal/counter"
    )
    
    // Supported reports whether the runtime supports [runtime.SetCrashOutput].
    //
    // 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+
    
    // Parent sets up the parent side of the crashmonitor. It requires
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:57:25 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  4. src/runtime/debug/example_monitor_test.go

    // license that can be found in the LICENSE file.
    
    package debug_test
    
    import (
    	"io"
    	"log"
    	"os"
    	"os/exec"
    	"runtime/debug"
    )
    
    // ExampleSetCrashOutput_monitor shows an example of using
    // [debug.SetCrashOutput] to direct crashes to a "monitor" process,
    // for automated crash reporting. The monitor is the same executable,
    // invoked in a special mode indicated by an environment variable.
    func ExampleSetCrashOutput_monitor() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:19:04 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  5. doc/next/6-stdlib/99-minor/runtime/debug/42888.md

    The [SetCrashOutput] function allows the user to specify an alternate
    file to which the runtime should write its fatal crash report.
    It may be used to construct an automated reporting mechanism for all
    unexpected crashes, not just those in goroutines that explicitly use
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 20:49:22 UTC 2024
    - 282 bytes
    - Viewed (0)
  6. src/runtime/debug/stack_test.go

    	switch os.Getenv("GO_RUNTIME_DEBUG_TEST_ENTRYPOINT") {
    	case "dumpgoroot":
    		fmt.Println(runtime.GOROOT())
    		os.Exit(0)
    
    	case "setcrashoutput":
    		f, err := os.Create(os.Getenv("CRASHOUTPUT"))
    		if err != nil {
    			log.Fatal(err)
    		}
    		if err := SetCrashOutput(f, debug.CrashOptions{}); err != nil {
    			log.Fatal(err) // e.g. EMFILE
    		}
    		println("hello")
    		panic("oops")
    	}
    
    	// default: run the tests.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:19:04 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  7. src/runtime/runtime.go

    	// If crashing, print a copy to the SetCrashOutput fd.
    	gp := getg()
    	if gp != nil && gp.m.dying > 0 ||
    		gp == nil && panicking.Load() > 0 {
    		if fd := crashFD.Load(); fd != ^uintptr(0) {
    			write(fd, unsafe.Pointer(data), n)
    		}
    	}
    }
    
    // crashFD is an optional file descriptor to use for fatal panics, as
    // set by debug.SetCrashOutput (see #42888). If it is a valid fd (not
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  8. src/runtime/traceback_system_test.go

    // TestTracebackSystem. It prints a crash report to stdout.
    func crash() {
    	// Ensure that we get pc=0x%x values in the traceback.
    	debug.SetTraceback("system")
    	writeSentinel(os.Stdout)
    	debug.SetCrashOutput(os.Stdout, debug.CrashOptions{})
    
    	go func() {
    		// This call is typically inlined.
    		child1()
    	}()
    	select {}
    }
    
    func child1() {
    	child2()
    }
    
    func child2() {
    	child3()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:19:04 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  9. src/runtime/write_err_android.go

    			logger = logd
    			initLogd()
    		} else {
    			logger = legacy
    			initLegacy()
    		}
    	}
    
    	// Write to stderr for command-line programs,
    	// and optionally to SetCrashOutput file.
    	writeErrData(&b[0], int32(len(b)))
    
    	// Log format: "<header>\x00<message m bytes>\x00"
    	//
    	// <header>
    	//   In legacy mode: "<priority 1 byte><tag n bytes>".
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  10. api/go1.23.txt

    pkg reflect, type Type interface, OverflowFloat(float64) bool #60427
    pkg reflect, type Type interface, OverflowInt(int64) bool #60427
    pkg reflect, type Type interface, OverflowUint(uint64) bool #60427
    pkg runtime/debug, func SetCrashOutput(*os.File, CrashOptions) error #42888
    pkg runtime/debug, type CrashOptions struct #67182
    pkg slices, func All[$0 interface{ ~[]$1 }, $1 interface{}]($0) iter.Seq2[int, $1] #61899
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 20:48:49 UTC 2024
    - 8.4K bytes
    - Viewed (0)
Back to top