|
@@ -52,7 +52,7 @@ The process id is &{2054 0}total 2056
|
|
|
|
|
|
|
|
```go
|
|
```go
|
|
|
// 2nd example: show all processes
|
|
// 2nd example: show all processes
|
|
|
-pid, err = os.StartProcess("/bin/ps", []string{"-e", "-opid,ppid,comm"}, procAttr)
|
|
|
|
|
|
|
+pid, err = os.StartProcess("/bin/ps", []string{"ps", "-e", "-opid,ppid,comm"}, procAttr)
|
|
|
|
|
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
fmt.Printf("Error %v starting process!", err) //
|
|
fmt.Printf("Error %v starting process!", err) //
|