summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--process/process.go5
2 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b08c4f0..1a05035 100644
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,4 @@
install:
go install github.com/buetow/gstat/gstat
+run:
+ go run gstat/main.go
diff --git a/process/process.go b/process/process.go
index d25164a..b44a586 100644
--- a/process/process.go
+++ b/process/process.go
@@ -22,7 +22,10 @@ func newError() (Process, error) {
}
func new(pidstr string) (Process, error) {
- pid, _ := strconv.Atoi(pidstr)
+ pid, err0 := strconv.Atoi(pidstr)
+ if err0 != nil {
+ return Process{}, err0
+ }
process := Process{Pid: pid}
var rawIo string