Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 28 for Closeonexec (0.39 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. src/syscall/exec_unix.go

    	}
    	bb := make([]*byte, len(ss)+1)
    	b := make([]byte, n)
    	n = 0
    	for i, s := range ss {
    		bb[i] = &b[n]
    		copy(b[n:], s)
    		n += len(s) + 1
    	}
    	return bb, nil
    }
    
    func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
    
    func SetNonblock(fd int, nonblocking bool) (err error) {
    	flag, err := fcntl(fd, F_GETFL, 0)
    	if err != nil {
    		return err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  8. src/os/file_unix.go

    	if setSticky {
    		setStickyBit(name)
    	}
    
    	// There's a race here with fork/exec, which we are
    	// content to live with. See ../syscall/exec_unix.go.
    	if !supportsCloseOnExec {
    		syscall.CloseOnExec(r)
    	}
    
    	f := newFile(r, name, kindOpenFile, unix.HasNonblockFlag(flag))
    	f.pfd.SysFile = s
    	return f, nil
    }
    
    func openDirNolog(name string) (*File, error) {
    	var (
    		r int
    		s poll.SysFile
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 13:52:34 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  9. src/runtime/netpoll_solaris.go

    	return int32(sysvicall4(&libc_port_alert, uintptr(port), uintptr(flags), uintptr(events), user))
    }
    
    var portfd int32 = -1
    
    func netpollinit() {
    	portfd = port_create()
    	if portfd >= 0 {
    		closeonexec(portfd)
    		return
    	}
    
    	print("runtime: port_create failed (errno=", errno(), ")\n")
    	throw("runtime: netpollinit failed")
    }
    
    func netpollIsPollDescriptor(fd uintptr) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  10. src/syscall/exec_windows.go

    	for _, s := range envv {
    		for _, c := range s {
    			b = utf16.AppendRune(b, c)
    		}
    		b = utf16.AppendRune(b, 0)
    	}
    	b = utf16.AppendRune(b, 0)
    	return b, nil
    }
    
    func CloseOnExec(fd Handle) {
    	SetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0)
    }
    
    func SetNonblock(fd Handle, nonblocking bool) (err error) {
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 28 18:29:48 UTC 2023
    - 10.3K bytes
    - Viewed (0)
Back to top