Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ImplementsGetwd (0.62 sec)

  1. src/runtime/testdata/testprog/syscalls_linux.go

    	}
    	// Check if it's a zombie thread.
    	return !bytes.Contains(stateLine[1], []byte{'Z'}), true, nil
    }
    
    func getcwd() (string, error) {
    	if !syscall.ImplementsGetwd {
    		return "", nil
    	}
    	// Use the syscall to get the current working directory.
    	// This is imperative for checking for OS thread state
    	// after an unshare since os.Getwd might just check the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 20:00:09 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  2. src/os/getwd.go

    		if err == nil && SameFile(dot, d) {
    			return dir, nil
    		}
    	}
    
    	// If the operating system provides a Getwd call, use it.
    	// Otherwise, we're trying to find our way back to ".".
    	if syscall.ImplementsGetwd {
    		var (
    			s string
    			e error
    		)
    		for {
    			s, e = syscall.Getwd()
    			if e != syscall.EINTR {
    				break
    			}
    		}
    		return s, NewSyscallError("getwd", e)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 28 06:28:02 UTC 2020
    - 2.5K bytes
    - Viewed (0)
  3. src/syscall/syscall_js.go

    	return 0, 0, ENOSYS
    }
    
    func Sysctl(key string) (string, error) {
    	if key == "kern.hostname" {
    		return "js", nil
    	}
    	return "", ENOSYS
    }
    
    const ImplementsGetwd = true
    
    func Getwd() (wd string, err error) {
    	var buf [PathMax]byte
    	n, err := Getcwd(buf[0:])
    	if err != nil {
    		return "", err
    	}
    	return string(buf[:n]), nil
    }
    
    func Getuid() int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. src/syscall/syscall_plan9.go

    // Note that sometimes we use a lowercase //sys name and
    // wrap it in our own nicer implementation.
    
    package syscall
    
    import (
    	"errors"
    	"internal/oserror"
    	"runtime"
    	"unsafe"
    )
    
    const ImplementsGetwd = true
    const bitSize16 = 2
    
    // ErrorString implements Error's String method by returning itself.
    //
    // ErrorString values can be tested against error values using [errors.Is].
    // For example:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 9.4K bytes
    - Viewed (0)
Back to top