Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for syscalls (0.1 sec)

  1. src/os/pidfd_linux.go

    //  v5.1: pidfd_send_signal syscall;
    //  v5.2: CLONE_PIDFD flag for clone syscall;
    //  v5.3: pidfd_open syscall, clone3 syscall;
    //  v5.4: P_PIDFD idtype support for waitid syscall;
    //  v5.6: pidfd_getfd syscall.
    
    package os
    
    import (
    	"errors"
    	"internal/syscall/unix"
    	"sync"
    	"syscall"
    	"unsafe"
    )
    
    func ensurePidfd(sysAttr *syscall.SysProcAttr) *syscall.SysProcAttr {
    	if !pidfdWorks() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 18:08:44 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. src/os/exec_windows.go

    	switch status {
    	case statusDone:
    		return ErrProcessDone
    	case statusReleased:
    		return syscall.EINVAL
    	}
    	defer p.handleTransientRelease()
    
    	if sig == Kill {
    		var terminationHandle syscall.Handle
    		e := syscall.DuplicateHandle(^syscall.Handle(0), syscall.Handle(handle), ^syscall.Handle(0), &terminationHandle, syscall.PROCESS_TERMINATE, false, 0)
    		if e != nil {
    			return NewSyscallError("DuplicateHandle", e)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. src/os/user/cgo_lookup_unix.go

    	var grp _C_struct_group
    	var found bool
    
    	err := retryWithBuffer(groupBuffer, func(buf []byte) syscall.Errno {
    		var errno syscall.Errno
    		grp, found, errno = _C_getgrgid_r(_C_gid_t(gid),
    			(*_C_char)(unsafe.Pointer(&buf[0])), _C_size_t(len(buf)))
    		return syscall.Errno(errno)
    	})
    	if err == syscall.ENOENT || (err == nil && !found) {
    		return nil, UnknownGroupIdError(strconv.Itoa(gid))
    	}
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:08:14 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. src/os/pidfd_other.go

    //go:build (unix && !linux) || (js && wasm) || wasip1 || windows
    
    package os
    
    import "syscall"
    
    func ensurePidfd(sysAttr *syscall.SysProcAttr) *syscall.SysProcAttr {
    	return sysAttr
    }
    
    func getPidfd(_ *syscall.SysProcAttr) (uintptr, bool) {
    	return 0, false
    }
    
    func pidfdFind(_ int) (uintptr, error) {
    	return 0, syscall.ENOSYS
    }
    
    func (p *Process) pidfdRelease() {}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 692 bytes
    - Viewed (0)
  5. src/os/exec_unix.go

    		// active call to the signal method to complete.
    		p.sigMu.Lock()
    		p.sigMu.Unlock()
    	}
    
    	var (
    		status syscall.WaitStatus
    		rusage syscall.Rusage
    		pid1   int
    		e      error
    	)
    	for {
    		pid1, e = syscall.Wait4(p.Pid, &status, 0, &rusage)
    		if e != syscall.EINTR {
    			break
    		}
    	}
    	if e != nil {
    		return nil, NewSyscallError("wait", e)
    	}
    	p.pidDeactivate(statusDone)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. src/os/exec_plan9.go

    package os
    
    import (
    	"internal/itoa"
    	"runtime"
    	"syscall"
    	"time"
    )
    
    // The only signal values guaranteed to be present in the os package
    // on all systems are Interrupt (send the process an interrupt) and
    // Kill (force the process to exit). Interrupt is not implemented on
    // Windows; using it with [os.Process.Signal] will return an error.
    var (
    	Interrupt Signal = syscall.Note("interrupt")
    	Kill      Signal = syscall.Note("kill")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  7. src/os/exec_linux.go

    // Copyright 2024 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package os
    
    import (
    	"syscall"
    )
    
    func (p *Process) closeHandle() {
    	syscall.Close(int(p.handle))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 261 bytes
    - Viewed (0)
  8. src/internal/syscall/unix/nofollow_bsd.go

    // license that can be found in the LICENSE file.
    
    //go:build dragonfly || freebsd
    
    package unix
    
    import "syscall"
    
    // References:
    // - https://man.freebsd.org/cgi/man.cgi?open(2)
    // - https://man.dragonflybsd.org/?command=open&section=2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:26 UTC 2024
    - 384 bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/telemetry/internal/configstore/download_windows.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build windows
    
    package configstore
    
    import (
    	"os/exec"
    	"syscall"
    
    	"golang.org/x/sys/windows"
    )
    
    func init() {
    	needNoConsole = needNoConsoleWindows
    }
    
    func needNoConsoleWindows(cmd *exec.Cmd) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 1K bytes
    - Viewed (0)
  10. src/os/pidfd_linux_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package os_test
    
    import (
    	"errors"
    	"internal/testenv"
    	"os"
    	"syscall"
    	"testing"
    )
    
    func TestFindProcessViaPidfd(t *testing.T) {
    	testenv.MustHaveGoBuild(t)
    	t.Parallel()
    
    	if err := os.CheckPidfdOnce(); err != nil {
    		// Non-pidfd code paths tested in exec_unix_test.go.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 18:08:44 UTC 2024
    - 1.6K bytes
    - Viewed (0)
Back to top