Go: make the system command more useful

Connect standard streams.
This commit is contained in:
Přemysl Eric Janouch 2018-10-09 18:31:17 +02:00
parent 1e03aeacdd
commit b3e27a5df3
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -958,6 +958,9 @@ func fnSystem(ell *Ell, args *V, result **V) bool {
}
cmd := exec.Command(argv[0], argv[1:]...)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
// Approximation of system(3) return value to match C ell at least a bit.
if err := cmd.Run(); err == nil {