1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-28 13:48:49 +08:00

13 Commits

Author SHA1 Message Date
Arturo Reuschenbach Puncernau
eb15d06a52 trim quotes when reading from os-release 2019-06-03 14:21:04 +02:00
shirou
07863cab0c [host]linux: add #688 diff which is removed after merging #689 2019-06-01 11:31:00 +09:00
Tyler Dixon
4e81681ab3 code review 2019-05-24 09:48:27 -07:00
Tyler Dixon
a02925055c Remove cycle between process and host packages
gopsutil is a transitive dependency of another project that I am integrating
into an internal build system. We target multiple platforms and as a part
of the build system for the large internal repo, we calculate the build
graph used to determine what targets have changed and need to be build /
tested as a single DAG for all platforms.

gopsutil currently does not form a DAG if linux and any other platform are
considered at the same time. linux is the only platform where the process
package imports the host package.

To remove this cycle, the relevant methods have been moved to internal/common
with the linux build tag and are consumed the host and process packages.
2019-05-22 17:45:50 -07:00
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.
2019-05-05 20:45:07 +01:00
Michael Schurter
042305ee4a Remove SetEnv on all platforms 2017-08-16 15:32:21 -07:00
Michael Schurter
565f5c8c5e Alter subprocess's environment instead of the hosts
Fixes #415
2017-08-16 14:54:50 -07:00
Asato Wakisaka
16a38100b3 NumProcs() just counts files under f, so use f.Readdirnames to avoid lstat syscall inside f.Readdir. 2017-05-25 00:04:41 +09:00
tycho garen
22c56d292e close open files 2017-02-22 08:46:23 -05:00
Sean Chittenden
613ada987d
Add DoSysctrl() to Linux's common utilities. 2016-08-11 00:48:24 -07:00
Sean Chittenden
e0b5f86113
Spell error like err. *facepalm* 2016-07-11 14:07:55 -04:00
Sean Chittenden
a3f57b1314
Resolve cyclic import and create a common helper func, NumProcs() 2016-07-11 14:05:30 -04:00
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
2015-10-18 20:40:01 -07:00