aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-10-09 18:31:17 +0200
committerPřemysl Janouch <p@janouch.name>2018-10-09 18:31:17 +0200
commitb3e27a5df38cf3856676b29d8d906c2abc2c5f67 (patch)
treefc71e93d7f469890efccf4bf88a0c4c102fa9ffe
parent1e03aeacdd96223d19260ee5a9d8794d2a14fe38 (diff)
downloadell-b3e27a5df38cf3856676b29d8d906c2abc2c5f67.tar.gz
ell-b3e27a5df38cf3856676b29d8d906c2abc2c5f67.tar.xz
ell-b3e27a5df38cf3856676b29d8d906c2abc2c5f67.zip
Go: make the `system` command more useful
Connect standard streams.
-rw-r--r--ell/ell.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/ell/ell.go b/ell/ell.go
index 9c04b2e..84d1bc3 100644
--- a/ell/ell.go
+++ b/ell/ell.go
@@ -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 {