Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for syscall (0.22 sec)

  1. misc/go_android_exec/main.go

    	lockPath := filepath.Join(os.TempDir(), "go_android_exec-adb-lock")
    	lock, err := os.OpenFile(lockPath, os.O_CREATE|os.O_RDWR, 0666)
    	if err != nil {
    		return 0, err
    	}
    	defer lock.Close()
    	if err := syscall.Flock(int(lock.Fd()), syscall.LOCK_EX); err != nil {
    		return 0, err
    	}
    
    	// In case we're booting a device or emulator alongside all.bash, wait for
    	// it to be ready. adb wait-for-device is not enough, we have to
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Aug 21 17:46:57 GMT 2023
    - 15.3K bytes
    - Viewed (0)
  2. cni/cmd/install-cni/main.go

    package main
    
    import (
    	"context"
    	"os"
    	"os/signal"
    	"syscall"
    
    	"istio.io/istio/cni/pkg/cmd"
    	"istio.io/istio/pkg/log"
    )
    
    func main() {
    	// Create context that cancels on termination signal
    	ctx, cancel := context.WithCancel(context.Background())
    	sigChan := make(chan os.Signal, 1)
    	signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM)
    	go func(sigChan chan os.Signal, cancel context.CancelFunc) {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue May 23 17:08:31 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  3. docs/debugging/reorder-disks/main.go

    		})
    	if err != nil {
    		return nil, err
    	}
    	return result, nil
    }
    
    type localDisk struct {
    	index int
    	path  string
    }
    
    func getMajorMinor(path string) (string, error) {
    	var stat syscall.Stat_t
    	if err := syscall.Stat(path, &stat); err != nil {
    		return "", fmt.Errorf("unable to stat `%s`: %w", path, err)
    	}
    
    	devID := uint64(stat.Dev)
    	major := (devID & 0x00000000000fff00) >> 8
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.4K bytes
    - Viewed (0)
Back to top