Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for xatexit (0.15 sec)

  1. src/cmd/dist/build.go

    	obj := pathf("%s/pkg/obj", goroot)
    	if !isdir(obj) {
    		xmkdir(obj)
    	}
    	xatexit(func() { xremove(obj) })
    
    	// Create build cache directory.
    	objGobuild := pathf("%s/pkg/obj/go-build", goroot)
    	if rebuildall {
    		xremoveall(objGobuild)
    	}
    	xmkdirall(objGobuild)
    	xatexit(func() { xremoveall(objGobuild) })
    
    	// Create directory for bootstrap versions of standard library .a files.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
  2. src/cmd/dist/buildtool.go

    	// We could use a temporary directory outside $GOROOT instead,
    	// but it is easier to debug on failure if the files are in a known location.
    	workspace := pathf("%s/pkg/bootstrap", goroot)
    	xremoveall(workspace)
    	xatexit(func() { xremoveall(workspace) })
    	base := pathf("%s/src/bootstrap", workspace)
    	xmkdirall(base)
    
    	// Copy source code into $GOROOT/pkg/bootstrap and rewrite import paths.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 23:29:41 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  3. src/cmd/dist/test.go

    	if strings.HasPrefix(os.Getenv("GO_BUILDER_NAME"), "linux-") {
    		if os.Getuid() == 0 {
    			// Don't bother making GOROOT unwritable:
    			// we're running as root, so permissions would have no effect.
    		} else {
    			xatexit(t.makeGOROOTUnwritable())
    		}
    	}
    
    	if !t.json {
    		if err := t.maybeLogMetadata(); err != nil {
    			t.failed = true
    			if t.keepGoing {
    				log.Printf("Failed logging metadata: %v", err)
    			} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 16:01:35 UTC 2024
    - 50K bytes
    - Viewed (0)
  4. src/cmd/covdata/covdata.go

    var memprofilerateflag = flag.Int("memprofilerate", 0, "Set memprofile sampling rate to value")
    
    var matchpkg func(name string) bool
    
    var atExitFuncs []func()
    
    func atExit(f func()) {
    	atExitFuncs = append(atExitFuncs, f)
    }
    
    func Exit(code int) {
    	for i := len(atExitFuncs) - 1; i >= 0; i-- {
    		f := atExitFuncs[i]
    		atExitFuncs = atExitFuncs[:i]
    		f()
    	}
    	os.Exit(code)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  5. src/runtime/ehooks_test.go

    			expected string
    			musthave []string
    		}{
    			{
    				mode:     "simple",
    				expected: "bar foo",
    			},
    			{
    				mode:     "goodexit",
    				expected: "orange apple",
    			},
    			{
    				mode:     "badexit",
    				expected: "blub blix",
    			},
    			{
    				mode: "panics",
    				musthave: []string{
    					"fatal error: exit hook invoked panic",
    					"main.testPanics",
    				},
    			},
    			{
    				mode: "callsexit",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/main.go

    	if ctxt.Debugvlog > 0 {
    		// dump symbol info on crash
    		defer func() { ctxt.loader.Dump() }()
    	}
    	if ctxt.Debugvlog > 1 {
    		// dump symbol info on error
    		AtExit(func() {
    			if nerrors > 0 {
    				ctxt.loader.Dump()
    			}
    		})
    	}
    
    	switch *flagHeadType {
    	case "":
    	case "windowsgui":
    		ctxt.HeadType = objabi.Hwindows
    		windowsgui = true
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:59:50 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  7. src/runtime/testdata/testexithooks/testexithooks.go

    	_ "unsafe"
    )
    
    var modeflag = flag.String("mode", "", "mode to run in")
    
    func main() {
    	flag.Parse()
    	switch *modeflag {
    	case "simple":
    		testSimple()
    	case "goodexit":
    		testGoodExit()
    	case "badexit":
    		testBadExit()
    	case "panics":
    		testPanics()
    	case "callsexit":
    		testHookCallsExit()
    	case "exit2":
    		testExit2()
    	default:
    		panic("unknown mode")
    	}
    }
    
    func testSimple() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  8. src/cmd/go/internal/base/base.go

    // it is a documentation pseudo-command such as importpath.
    func (c *Command) Runnable() bool {
    	return c.Run != nil
    }
    
    var atExitFuncs []func()
    
    func AtExit(f func()) {
    	atExitFuncs = append(atExitFuncs, f)
    }
    
    func Exit() {
    	for _, f := range atExitFuncs {
    		f()
    	}
    	os.Exit(exitStatus)
    }
    
    func Fatalf(format string, args ...any) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  9. src/encoding/gob/type.go

    	base        reflect.Type // the base type after all indirections
    	indir       int          // number of indirections to reach the base type
    	externalEnc int          // xGob, xBinary, or xText
    	externalDec int          // xGob, xBinary, or xText
    	encIndir    int8         // number of indirections to reach the receiver type; may be negative
    	decIndir    int8         // number of indirections to reach the receiver type; may be negative
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  10. src/cmd/go/main.go

    	if cfg.DebugTrace == "" {
    		return pctx
    	}
    
    	ctx, close, err := trace.Start(pctx, cfg.DebugTrace)
    	if err != nil {
    		base.Fatalf("failed to start trace: %v", err)
    	}
    	base.AtExit(func() {
    		if err := close(); err != nil {
    			base.Fatalf("failed to stop trace: %v", err)
    		}
    	})
    
    	return ctx
    }
    
    // handleChdirFlag handles the -C flag before doing anything else.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:09:11 UTC 2024
    - 10K bytes
    - Viewed (0)
Back to top