[v3] fix Signal import on dragonfly OS in fallback
This commit is contained in:
parent
ed7efd5d01
commit
4db4dc09a0
|
@ -16,6 +16,8 @@ jobs:
|
|||
go-version: ${{ matrix.go-version }}
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ${{ github.workspace }}/src/github.com/shirou/gopsutil
|
||||
- name: Get dependencies
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
|
@ -24,13 +26,13 @@ jobs:
|
|||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||
echo "PATH=$GOPATH/bin:$PATH" >> $GITHUB_PATH
|
||||
fi
|
||||
cd /home/runner/work/gopsutil/gopsutil/
|
||||
cd $GOPATH/src/github.com/shirou/gopsutil
|
||||
dep ensure
|
||||
# exclude v3 from being run with ./...
|
||||
rm -rf $GOPATH/src/github.com/shirou/gopsutil/v3
|
||||
- name: Build Test v2
|
||||
run: |
|
||||
make build_test
|
||||
cd $GOPATH/src/github.com/shirou/gopsutil && make build_test
|
||||
build_test_v3:
|
||||
strategy:
|
||||
matrix:
|
||||
|
|
|
@ -4,12 +4,15 @@ package process
|
|||
|
||||
import (
|
||||
"context"
|
||||
"syscall"
|
||||
|
||||
"github.com/shirou/gopsutil/v3/cpu"
|
||||
"github.com/shirou/gopsutil/v3/internal/common"
|
||||
"github.com/shirou/gopsutil/v3/net"
|
||||
)
|
||||
|
||||
type Signal = syscall.Signal
|
||||
|
||||
type MemoryMapsStat struct {
|
||||
Path string `json:"path"`
|
||||
Rss uint64 `json:"rss"`
|
||||
|
|
|
@ -82,7 +82,7 @@ func isMount(path string) bool {
|
|||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if fileInfo.Mode() & os.ModeSymlink != 0 {
|
||||
if fileInfo.Mode()&os.ModeSymlink != 0 {
|
||||
return false
|
||||
}
|
||||
var stat1 unix.Stat_t
|
||||
|
|
Loading…
Reference in New Issue