library: fmt.(*pp).doPrint; syscall.forkAndExecInChild

This commit is contained in:
xushiwei
2024-07-29 00:02:30 +08:00
parent a5dff9fb15
commit 4df478316c
3 changed files with 17 additions and 17 deletions

View File

@@ -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))
}