library: fmt.(*pp).doPrint; syscall.forkAndExecInChild
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
@@ -15,4 +16,7 @@ func main() {
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Run()
|
||||
|
||||
output, _ := exec.Command(ls).Output()
|
||||
fmt.Print(string(output))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user