Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for Getpid (0.64 sec)

  1. src/cmd/go/testdata/script/test_fuzz_non_crash_signal.txt

    )
    
    func FuzzNonCrash(f *testing.F) {
    	f.Fuzz(func(*testing.T, bool) {
    		pid := syscall.Getpid()
    		if err := syscall.Kill(pid, syscall.SIGTERM); err != nil {
    			panic(err)
    		}
    		// signal may not be received immediately. Wait for it.
    		select{}
    	})
    }
    
    func FuzzKill(f *testing.F) {
    	f.Fuzz(func(*testing.T, bool) {
    		pid := syscall.Getpid()
    		if err := syscall.Kill(pid, syscall.SIGKILL); err != nil {
    			panic(err)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 16 16:53:11 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testsanitizers/testdata/tsan10.go

    #cgo CFLAGS: -g -fsanitize=thread
    #cgo LDFLAGS: -g -fsanitize=thread
    */
    import "C"
    
    func main() {
    	c := make(chan os.Signal, 1)
    	signal.Notify(c, syscall.SIGUSR1)
    	defer signal.Stop(c)
    	syscall.Kill(syscall.Getpid(), syscall.SIGUSR1)
    	<-c
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 798 bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/test2json_interrupt.txt

    )
    
    func FuzzInterrupt(f *testing.F) {
    	pids := os.Getenv("GO_TEST_INTERRUPT_PIDS")
    	if pids == "" {
    		// This is the main test process.
    		// Set the environment variable for fuzz workers.
    		pid := os.Getpid()
    		ppid := os.Getppid()
    		os.Setenv("GO_TEST_INTERRUPT_PIDS", fmt.Sprintf("%d,%d", ppid, pid))
    	}
    
    	sentInterrupt := false
    	f.Fuzz(func(t *testing.T, orig string) {
    		if !sentInterrupt {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 08 03:52:44 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  4. src/cmd/go/testdata/script/test_fuzz_fuzztime.txt

    func FuzzFast(f *testing.F) {
    	f.Fuzz(func (*testing.T, []byte) {})
    }
    -- fuzz_count_test.go --
    package fuzz
    
    import (
    	"fmt"
    	"os"
    	"testing"
    )
    
    func FuzzTestCount(f *testing.F) {
    	pid := os.Getpid()
    	n := 0
    	f.Fuzz(func(t *testing.T, _ []byte) {
    		name := fmt.Sprintf("count/%v.%d", pid, n)
    		if err := os.WriteFile(name, nil, 0666); err != nil {
    			t.Fatal(err)
    		}
    		n++
    	})
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 01 20:09:52 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testsanitizers/testdata/tsan12.go

    	signal.Notify(ch, syscall.SIGUSR1)
    
    	if err := exec.Command("true").Run(); err != nil {
    		fmt.Fprintf(os.Stderr, "Unexpected error from `true`: %v", err)
    		os.Exit(1)
    	}
    
    	syscall.Kill(syscall.Getpid(), syscall.SIGUSR1)
    	<-ch
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 929 bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/testdata/deadcode/globalmap.go

    package main
    
    import "os"
    
    // Too small to trigger deadcode (currently)
    var small = map[string]int{"foo": 1}
    
    // Has side effects, which prevent deadcode
    var effect = map[string]int{"foo": os.Getpid()}
    
    // Large and side-effect free
    var large = map[string]int{
    	"11": 1, "12": 2, "13": 3, "14": 4, "15": 5, "16": 6, "17": 7, "18": 8, "19": 9, "110": 10,
    	"21": 1, "22": 2, "23": 3, "24": 4, "25": 5, "26": 6, "27": 7, "28": 8, "29": 9, "210": 10,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 06 20:56:47 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. src/cmd/link/internal/ld/testdata/issue39256/x.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	_ "unsafe"
    )
    
    //go:cgo_import_dynamic libc_getpid getpid "libc.so"
    //go:cgo_import_dynamic libc_kill kill "libc.so"
    //go:cgo_import_dynamic libc_close close "libc.so"
    //go:cgo_import_dynamic libc_open open "libc.so"
    
    //go:cgo_import_dynamic _ _ "libc.so"
    
    func trampoline()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 16 18:39:54 UTC 2020
    - 489 bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/testsanitizers/testdata/tsan11.go

    		exit(EXIT_FAILURE);
    	}
    }
    */
    import "C"
    
    func main() {
    	ch := make(chan os.Signal, 1)
    	signal.Notify(ch, syscall.SIGUSR2)
    
    	C.register_handler(C.int(syscall.SIGUSR1))
    	syscall.Kill(syscall.Getpid(), syscall.SIGUSR1)
    
    	<-ch
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/inline/inlheur/funcprops_test.go

    func gatherPropsDumpForFile(t *testing.T, testcase string, td string) (string, error) {
    	t.Helper()
    	gopath := "testdata/props/" + testcase + ".go"
    	outpath := filepath.Join(td, testcase+".a")
    	salt := fmt.Sprintf(".p%dt%d", os.Getpid(), time.Now().UnixNano())
    	dumpfile := filepath.Join(td, testcase+salt+".dump.txt")
    	run := []string{testenv.GoToolPath(t), "build",
    		"-gcflags=-d=dumpinlfuncprops=" + dumpfile, "-o", outpath, gopath}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 20:15:25 UTC 2023
    - 15K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/test/issue1435.go

    		{call: "Setuid(0)", fn: func() error { return syscall.Setuid(0) }, filter: "Uid:", expect: "\t0\t0\t0\t0"},
    
    		{call: "Setgid(1)", fn: func() error { return syscall.Setgid(1) }, filter: "Gid:", expect: "\t1\t1\t1\t1"},
    		{call: "Setgid(0)", fn: func() error { return syscall.Setgid(0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 28 21:31:41 UTC 2023
    - 7.5K bytes
    - Viewed (0)
Back to top