Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 432 for proc (0.04 sec)

  1. src/syscall/syscall_ptrace_test.go

    	if err != nil {
    		t.Skipf("skipped because sh is not available")
    	}
    
    	attr := &os.ProcAttr{
    		Sys: &syscall.SysProcAttr{
    			Ptrace: true,
    		},
    	}
    	proc, err := os.StartProcess(bin, []string{bin}, attr)
    	if err == nil {
    		proc.Kill()
    	}
    	if err != nil && !os.IsPermission(err) {
    		t.Fatalf("StartProcess with ptrace enabled failed: %v", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 768 bytes
    - Viewed (0)
  2. src/cmd/go/internal/generate/generate_test.go

    }
    
    func TestGenerateCommandParse(t *testing.T) {
    	dir := filepath.Join(testenv.GOROOT(t), "src", "sys")
    	g := &Generator{
    		r:        nil, // Unused here.
    		path:     filepath.Join(dir, "proc.go"),
    		dir:      dir,
    		file:     "proc.go",
    		pkg:      "sys",
    		commands: make(map[string][]string),
    	}
    	g.setEnv()
    	g.setShorthand([]string{"-command", "yacc", "go", "tool", "yacc"})
    	for _, test := range splitTests {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 20 14:09:12 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  3. src/internal/syscall/windows/exec_windows_test.go

    			return nil, e
    		}
    	}
    }
    
    func getIntegrityLevelToken(wns string) (syscall.Token, error) {
    	var procToken, token syscall.Token
    
    	proc, err := syscall.GetCurrentProcess()
    	if err != nil {
    		return 0, err
    	}
    	defer syscall.CloseHandle(proc)
    
    	err = syscall.OpenProcessToken(proc,
    		syscall.TOKEN_DUPLICATE|
    			syscall.TOKEN_ADJUST_DEFAULT|
    			syscall.TOKEN_QUERY|
    			syscall.TOKEN_ASSIGN_PRIMARY,
    		&procToken)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/netns_linux_test.go

    // limitations under the License.
    
    package nodeagent
    
    import "testing"
    
    func TestOpenNetns(t *testing.T) {
    	ns, err := OpenNetns("/proc/self/ns/net")
    	if err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    	// the inode for netns is proc dynamic, so it needs to be higher than
    	// #define PROC_DYNAMIC_FIRST 0xF0000000U
    
    	if ns.Inode() < 0xF0000000 {
    		t.Fatalf("unexpected inode: %v", ns.Inode())
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 26 20:34:28 UTC 2024
    - 976 bytes
    - Viewed (0)
  5. test/fixedbugs/issue5963.go

    fatal error: internal lockOSThread error
    
    goroutine 2 [runnable]:
    runtime.MHeap_Scavenger()
    	/Users/rsc/g/go/src/pkg/runtime/mheap.c:438
    runtime.goexit()
    	/Users/rsc/g/go/src/pkg/runtime/proc.c:1313
    created by runtime.main
    	/Users/rsc/g/go/src/pkg/runtime/proc.c:165
    
    goroutine 3 [runnable]:
    main.funcĀ·002()
    	/Users/rsc/g/go/test/fixedbugs/issue5963.go:22
    created by main.initĀ·1
    	/Users/rsc/g/go/test/fixedbugs/issue5963.go:24 +0xb9
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 929 bytes
    - Viewed (0)
  6. internal/net/net.go

    	"github.com/prometheus/procfs"
    )
    
    // GetInterfaceNetStats - get procfs.NetDevLine by interfaceName
    func GetInterfaceNetStats(interf string) (procfs.NetDevLine, error) {
    	proc, err := procfs.Self()
    	if err != nil {
    		return procfs.NetDevLine{}, err
    	}
    	netDev, err := proc.NetDev()
    	if err != nil {
    		return procfs.NetDevLine{}, err
    	}
    	ndl, ok := netDev[interf]
    	if !ok {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jul 17 08:14:01 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. pkg/util/procfs/procfs_linux.go

    			pid, err := strconv.Atoi(entry.Name())
    			if err != nil {
    				continue
    			}
    
    			cmdline, err := os.ReadFile(filepath.Join("/proc", entry.Name(), "cmdline"))
    			if err != nil {
    				klog.V(4).Infof("Error reading file %s: %+v", filepath.Join("/proc", entry.Name(), "cmdline"), err)
    				continue
    			}
    
    			// The bytes we read have '\0' as a separator for the command line
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 16 09:22:35 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  8. internal/mountinfo/mountinfo.go

    package mountinfo
    
    // mountInfo - This represents a single line in /proc/mounts.
    type mountInfo struct {
    	Device  string
    	Path    string
    	FSType  string
    	Options []string
    	Freq    string
    	Pass    string
    }
    
    func (m mountInfo) String() string {
    	return m.Path
    }
    
    // mountInfos - This represents the entire /proc/mounts.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Aug 19 01:35:22 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  9. pkg/util/oom/oom_linux.go

    	return oomAdjuster
    }
    
    func getPids(cgroupName string) ([]int, error) {
    	return cmutil.GetPids(filepath.Join("/", cgroupName))
    }
    
    // Writes 'value' to /proc/<pid>/oom_score_adj. PID = 0 means self
    // Returns os.ErrNotExist if the `pid` does not exist.
    func applyOOMScoreAdj(pid int, oomScoreAdj int) error {
    	if pid < 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 20 07:13:28 UTC 2022
    - 4K bytes
    - Viewed (0)
  10. src/runtime/testdata/testprog/syscall_windows.go

    	register("StackMemory", StackMemory)
    }
    
    func RaiseException() {
    	const EXCEPTION_NONCONTINUABLE = 1
    	mod := syscall.MustLoadDLL("kernel32.dll")
    	proc := mod.MustFindProc("RaiseException")
    	proc.Call(0xbad, EXCEPTION_NONCONTINUABLE, 0, 0)
    	println("RaiseException should not return")
    }
    
    func ZeroDivisionException() {
    	x := 1
    	y := 0
    	z := x / y
    	println(z)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 23 17:31:31 UTC 2023
    - 1.5K bytes
    - Viewed (0)
Back to top