Commit Graph

11 Commits (8a083b839365760840217ba734d66a76d5eaf635)

Author SHA1 Message Date
Segflow 86c7289ccc Fix: use filename in exec.LookPath instead of full path
exec.LookPath searches for the file in the $PATH, which mean giving it an absolute path is against it's own purposes.
6 years ago
WAKAYAMA shirou bb15c85289 [mem][freebsd]: add SysctlUint which can adapt both 32 and 64 bit 6 years ago
Michael Schurter 042305ee4a Remove SetEnv on all platforms 8 years ago
Sean Chittenden 635b971c0e
Move from the `syscall` package to the `golang.org/x/sys/{unix,windows}` 8 years ago
Marco Pfatschbacher b4846b445b Add support for OpenBSD/amd64
This code is based on the FreeBSD version
and implements roughly the same feature set.
8 years ago
Shirou WAKAYAMA bce9212def fix build bugs. 9 years ago
Shirou WAKAYAMA d21ed2b40d search path via exec.LookPath before actual invoke. 9 years ago
Shirou WAKAYAMA 944429d994 fixed by errcheck 9 years ago
Shirou WAKAYAMA 3166d41538 set LC_ALL to C in order to avoid number formatting problem. 9 years ago
elij d1380cba29 try to fix diskio stats on FreeBSD-10.x
FreeBSD apparently changed the magic sysctl mib values for devstats.

    --- FAIL: TestDisk_io_counters (0.00s)
    disk_test.go:39: error no such file or directory
    disk_test.go:42: ret is empty, map[]

This code uses an undocumented, but exported, go stdlib method to fetch
the sysctl by string instead of mib.
9 years ago
Daniel Theophanes 0af895258e common: rename package common to internal/common. Add ENV helper funcs.
Package common wasn't used for public functions. Place it in an
internal directory to prevent other packages from using.

Remove the distributed references to "HOST_PROC" and "HOST_SYS"
consts and combine into a common function. This also helps so that
if a env var is defined with a trailing slash all will continue to
work as expected.

Fixes #100
10 years ago