Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 78 for syscall (0.17 sec)

  1. internal/lock/lock_solaris.go

    package lock
    
    import (
    	"os"
    	"syscall"
    )
    
    // lockedOpenFile is an internal function.
    func lockedOpenFile(path string, flag int, perm os.FileMode, rlockType int) (*LockedFile, error) {
    	var lockType int16
    	switch flag {
    	case syscall.O_RDONLY:
    		lockType = syscall.F_RDLCK
    	case syscall.O_WRONLY:
    		fallthrough
    	case syscall.O_RDWR:
    		fallthrough
    	case syscall.O_WRONLY | syscall.O_CREAT:
    		fallthrough
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  2. internal/lock/lock_windows.go

    		fallthrough
    	case syscall.O_WRONLY | syscall.O_CREAT:
    		access = syscall.GENERIC_READ | syscall.GENERIC_WRITE
    	case syscall.O_WRONLY | syscall.O_CREAT | syscall.O_APPEND:
    		access = syscall.FILE_APPEND_DATA
    	default:
    		return nil, fmt.Errorf("Unsupported flag (%d)", flag)
    	}
    
    	var createflag uint32
    	switch {
    	case flag&syscall.O_CREAT == syscall.O_CREAT:
    		createflag = syscall.OPEN_ALWAYS
    	default:
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  3. cmd/os_windows.go

    	globAllP, err := syscall.UTF16PtrFromString(globAll)
    	if err != nil {
    		return nil, errInvalidArgument
    	}
    	data := &syscall.Win32finddata{}
    	handle, err := syscall.FindFirstFile(globAllP, data)
    	if err != nil {
    		return nil, syscallErrToFileErr(dirPath, err)
    	}
    
    	defer syscall.FindClose(handle)
    
    	count := opts.count
    	for ; count != 0; err = syscall.FindNextFile(handle, data) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/issue18146.go

    				err = pe.Err
    			}
    			if se, ok := err.(syscall.Errno); ok && (se == syscall.EAGAIN || se == syscall.EMFILE) {
    				time.Sleep(time.Millisecond)
    				continue
    			}
    
    			t.Error(err)
    			return
    		}
    		cmds = append(cmds, cmd)
    	}
    
    	failures := 0
    	for _, cmd := range cmds {
    		err := cmd.Wait()
    		if err == nil {
    			continue
    		}
    
    		t.Errorf("syscall.Exec failed: %v\n%s", err, cmd.Stdout)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Sep 05 23:35:32 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  5. cmd/xl-storage-errors.go

    package cmd
    
    import (
    	"errors"
    	"os"
    	"runtime"
    	"syscall"
    )
    
    // No space left on device error
    func isSysErrNoSpace(err error) bool {
    	return errors.Is(err, syscall.ENOSPC)
    }
    
    // Invalid argument, unsupported flags such as O_DIRECT
    func isSysErrInvalidArg(err error) bool {
    	return errors.Is(err, syscall.EINVAL)
    }
    
    // Input/output error
    func isSysErrIO(err error) bool {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 06 16:56:29 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  6. cmd/xl-storage-errors_test.go

    package cmd
    
    import (
    	"os"
    	"runtime"
    	"syscall"
    	"testing"
    )
    
    func TestSysErrors(t *testing.T) {
    	pathErr := &os.PathError{Err: syscall.ENAMETOOLONG}
    	ok := isSysErrTooLong(pathErr)
    	if !ok {
    		t.Fatalf("Unexpected error expecting %s", syscall.ENAMETOOLONG)
    	}
    	pathErr = &os.PathError{Err: syscall.ENOTDIR}
    	ok = isSysErrNotDir(pathErr)
    	if !ok {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 1.7K bytes
    - Viewed (0)
  7. internal/http/dial_linux.go

    			_ = syscall.SetsockoptInt(fd, syscall.IPPROTO_TCP, syscall.TCP_KEEPCNT, 5)
    
    			// Wait time after successful probe in seconds.
    			// ~ cat /proc/sys/net/ipv4/tcp_keepalive_intvl (defaults to 75 secs, we reduce it to 15 secs)
    			_ = syscall.SetsockoptInt(fd, syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, 15)
    
    			// Set tcp user timeout in addition to the keep-alive - tcp-keepalive is not enough to close a socket
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Jun 07 16:53:05 GMT 2023
    - 4.4K bytes
    - Viewed (3)
  8. src/archive/tar/stat_actime1.go

    // license that can be found in the LICENSE file.
    
    //go:build aix || linux || dragonfly || openbsd || solaris
    
    package tar
    
    import (
    	"syscall"
    	"time"
    )
    
    func statAtime(st *syscall.Stat_t) time.Time {
    	return time.Unix(st.Atim.Unix())
    }
    
    func statCtime(st *syscall.Stat_t) time.Time {
    	return time.Unix(st.Ctim.Unix())
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Oct 28 18:17:57 GMT 2021
    - 431 bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/test/issue1435.go

    }
    
    // test1435 test 9 glibc implemented setuid/gid syscall functions are
    // mapped.  This test is a slightly more expansive test than that of
    // src/syscall/syscall_linux_test.go:TestSetuidEtc() insofar as it
    // launches concurrent threads from C code via CGo and validates that
    // they are subject to the system calls being tested. For the actual
    // Go functionality being tested here, the syscall_linux_test version
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Jul 28 21:31:41 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  10. cmd/os_unix.go

    	}
    	consumed = int(dirent.Reclen)
    	if direntInode(dirent) == 0 { // File absent in directory.
    		return
    	}
    	switch dirent.Type {
    	case syscall.DT_REG:
    		typ = 0
    	case syscall.DT_DIR:
    		typ = os.ModeDir
    	case syscall.DT_LNK:
    		typ = os.ModeSymlink
    	default:
    		// Skip all other file types. Revisit if/when this code needs
    		// to handle such files, MinIO is only interested in
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top