Merge branch 'master' of github.com:shirou/gopsutil

This commit is contained in:
Shirou WAKAYAMA 2014-04-25 17:19:35 +09:00
commit 9ae9ff1bce
3 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ func Pids() ([]int32, error) {
func (p *Process) Memory_Maps() (*[]Memory_mapsStat, error) { func (p *Process) Memory_Maps() (*[]Memory_mapsStat, error) {
ret := make([]Memory_mapsStat, 0) ret := make([]Memory_mapsStat, 0)
return ret, nil return &ret, nil
} }
func copy_params(k *Kinfo_proc, p *Process) error { func copy_params(k *Kinfo_proc, p *Process) error {

View File

@ -3,9 +3,9 @@ package gopsutil
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"os"
"runtime" "runtime"
"testing" "testing"
"os"
) )
func Test_Pids(t *testing.T) { func Test_Pids(t *testing.T) {
@ -35,7 +35,7 @@ func Test_Pid_exists(t *testing.T) {
} }
func Test_NewProcess(t *testing.T) { func Test_NewProcess(t *testing.T) {
check_pid := 19472 check_pid := 1
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
check_pid = 0 check_pid = 0
} }

View File

@ -73,7 +73,7 @@ func Pids() ([]int32, error) {
func (p *Process) Memory_Maps() (*[]Memory_mapsStat, error) { func (p *Process) Memory_Maps() (*[]Memory_mapsStat, error) {
ret := make([]Memory_mapsStat, 0) ret := make([]Memory_mapsStat, 0)
return ret, nil return &ret, nil
} }
func NewProcess(pid int32) (*Process, error) { func NewProcess(pid int32) (*Process, error) {