1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #25561 from allencloud/make-more-pkgs-support-darwin

make more pkgs support darwin
This commit is contained in:
Michael Crosby 2016-08-11 14:17:57 -07:00 committed by GitHub
commit 3011a41d3f
10 changed files with 20 additions and 24 deletions

View file

@ -13,7 +13,7 @@ func Self() string {
return "/proc/self/exe"
}
// Command returns *exec.Cmd which have Path as current binary. Also it setting
// Command returns *exec.Cmd which has Path as current binary. Also it setting
// SysProcAttr.Pdeathsig to SIGTERM.
// This will use the in-memory version (/proc/self/exe) of the current binary,
// it is thus safe to delete or replace the on-disk binary (os.Args[0]).

View file

@ -1,4 +1,4 @@
// +build freebsd solaris
// +build freebsd solaris darwin
package reexec
@ -12,7 +12,7 @@ func Self() string {
return naiveSelf()
}
// Command returns *exec.Cmd which have Path as current binary.
// Command returns *exec.Cmd which has Path as current binary.
// For example if current binary is "docker" at "/usr/bin/", then cmd.Path will
// be set to "/usr/bin/docker".
func Command(args ...string) *exec.Cmd {

View file

@ -1,4 +1,4 @@
// +build !linux,!windows,!freebsd,!solaris
// +build !linux,!windows,!freebsd,!solaris,!darwin
package reexec
@ -6,7 +6,7 @@ import (
"os/exec"
)
// Command is unsupported on operating systems apart from Linux and Windows.
// Command is unsupported on operating systems apart from Linux, Windows, Solaris and Darwin.
func Command(args ...string) *exec.Cmd {
return nil
}

View file

@ -12,7 +12,7 @@ func Self() string {
return naiveSelf()
}
// Command returns *exec.Cmd which have Path as current binary.
// Command returns *exec.Cmd which has Path as current binary.
// For example if current binary is "docker.exe" at "C:\", then cmd.Path will
// be set to "C:\docker.exe".
func Command(args ...string) *exec.Cmd {

View file

@ -1,7 +0,0 @@
package sysinfo
// New returns an empty SysInfo for freebsd for now.
func New(quiet bool) *SysInfo {
sysInfo := &SysInfo{}
return sysInfo
}

View file

@ -0,0 +1,9 @@
// +build !linux,!solaris,!windows
package sysinfo
// New returns an empty SysInfo for non linux nor solaris for now.
func New(quiet bool) *SysInfo {
sysInfo := &SysInfo{}
return sysInfo
}

View file

@ -1,3 +1,5 @@
// +build windows
package sysinfo
// New returns an empty SysInfo for windows for now.

View file

@ -1,8 +0,0 @@
package system
import "syscall"
// LUtimesNano is not supported by darwin platform.
func LUtimesNano(path string, ts []syscall.Timespec) error {
return ErrNotSupportedPlatform
}

View file

@ -1,10 +1,10 @@
// +build !linux,!freebsd,!darwin
// +build !linux,!freebsd
package system
import "syscall"
// LUtimesNano is not supported on platforms other than linux, freebsd and darwin.
// LUtimesNano is only supported on linux and freebsd.
func LUtimesNano(path string, ts []syscall.Timespec) error {
return ErrNotSupportedPlatform
}

View file

@ -1,6 +1,6 @@
// +build !windows
// Package term provides provides structures and helper functions to work with
// Package term provides structures and helper functions to work with
// terminal (state, sizes).
package term