Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 35 for Closeonexec (0.28 sec)

  1. src/internal/poll/sys_cloexec.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // This file implements accept for platforms that do not provide a fast path for
    // setting SetNonblock and CloseOnExec.
    
    //go:build aix || darwin || (js && wasm) || wasip1
    
    package poll
    
    import (
    	"syscall"
    )
    
    // Wrapper around the accept system call that marks the returned file
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 07 23:34:17 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  2. src/runtime/export_unix_test.go

    // license that can be found in the LICENSE file.
    
    //go:build unix
    
    package runtime
    
    import "unsafe"
    
    var NonblockingPipe = nonblockingPipe
    var Fcntl = fcntl
    var Closeonexec = closeonexec
    
    func sigismember(mask *sigset, i int) bool {
    	clear := *mask
    	sigdelset(&clear, i)
    	return clear != *mask
    }
    
    func Sigisblocked(i int) bool {
    	var sigmask sigset
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 20 21:27:51 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  3. src/internal/poll/sock_cloexec.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // This file implements accept for platforms that provide a fast path for
    // setting SetNonblock and CloseOnExec.
    
    //go:build dragonfly || freebsd || (linux && !arm) || netbsd || openbsd
    
    package poll
    
    import "syscall"
    
    // Wrapper around the accept system call that marks the returned file
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:17:25 UTC 2024
    - 712 bytes
    - Viewed (0)
  4. src/internal/poll/fd_unixjs.go

    func dupCloseOnExecOld(fd int) (int, string, error) {
    	syscall.ForkLock.RLock()
    	defer syscall.ForkLock.RUnlock()
    	newfd, err := syscall.Dup(fd)
    	if err != nil {
    		return -1, "dup", err
    	}
    	syscall.CloseOnExec(newfd)
    	return newfd, "", nil
    }
    
    // Fchdir wraps syscall.Fchdir.
    func (fd *FD) Fchdir() error {
    	if err := fd.incref(); err != nil {
    		return err
    	}
    	defer fd.decref()
    	return syscall.Fchdir(fd.Sysfd)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 25 00:12:41 UTC 2023
    - 2K bytes
    - Viewed (0)
  5. src/runtime/os_darwin.go

    	if sigNoteRead != 0 || sigNoteWrite != 0 {
    		// Generalizing this would require avoiding the pipe-fork-closeonexec race, which entangles syscall.
    		throw("duplicate sigNoteSetup")
    	}
    	var errno int32
    	sigNoteRead, sigNoteWrite, errno = pipe()
    	if errno != 0 {
    		throw("pipe failed")
    	}
    	closeonexec(sigNoteRead)
    	closeonexec(sigNoteWrite)
    
    	// Make the write end of the pipe non-blocking, so that if the pipe
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  6. src/internal/poll/fd_plan9.go

    	return errors.New("not implemented")
    }
    
    func DupCloseOnExec(fd int) (int, string, error) {
    	nfd, err := syscall.Dup(int(fd), -1)
    	if err != nil {
    		return 0, "dup", err
    	}
    	// Plan9 has no syscall.CloseOnExec but
    	// its forkAndExecInChild closes all fds
    	// not related to the fork+exec.
    	return nfd, "", nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  7. src/runtime/crash_unix_test.go

    func TestSignalM(t *testing.T) {
    	r, w, errno := runtime.Pipe()
    	if errno != 0 {
    		t.Fatal(syscall.Errno(errno))
    	}
    	defer func() {
    		runtime.Close(r)
    		runtime.Close(w)
    	}()
    	runtime.Closeonexec(r)
    	runtime.Closeonexec(w)
    
    	var want, got int64
    	var wg sync.WaitGroup
    	ready := make(chan *runtime.M)
    	wg.Add(1)
    	go func() {
    		runtime.LockOSThread()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 20:11:47 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/sys/windows/exec_windows.go

    func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {
    	argp, err := commandLineToArgv(cmd, argc)
    	argv = (*[8192]*[8192]uint16)(unsafe.Pointer(argp))
    	return argv, err
    }
    
    func CloseOnExec(fd Handle) {
    	SetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0)
    }
    
    // FullPath retrieves the full path of the specified file.
    func FullPath(name string) (path string, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 10 16:32:44 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  9. src/os/removeall_at.go

    		if e == nil {
    			break
    		}
    
    		// See comment in openFileNolog.
    		if e == syscall.EINTR {
    			continue
    		}
    
    		return nil, e
    	}
    
    	if !supportsCloseOnExec {
    		syscall.CloseOnExec(r)
    	}
    
    	// We use kindNoPoll because we know that this is a directory.
    	return newFile(r, name, kindNoPoll, false), nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:26 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. src/runtime/netpoll_kqueue.go

    )
    
    func netpollinit() {
    	kq = kqueue()
    	if kq < 0 {
    		println("runtime: kqueue failed with", -kq)
    		throw("runtime: netpollinit failed")
    	}
    	closeonexec(kq)
    	addWakeupEvent(kq)
    }
    
    func netpollopen(fd uintptr, pd *pollDesc) int32 {
    	// Arm both EVFILT_READ and EVFILT_WRITE in edge-triggered mode (EV_CLEAR)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 21:17:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top