|
|
|
@ -29,6 +29,8 @@ var stdLibrary = vars{
|
|
|
|
|
"stdin": &IOHandle{os.Stdin, true, "file (read-only)"},
|
|
|
|
|
"stdout": &IOHandle{os.Stdout, true, "file (write-only)"},
|
|
|
|
|
"stderr": &IOHandle{os.Stderr, true, "file (write-only)"},
|
|
|
|
|
// TODO add /dev/null
|
|
|
|
|
// TODO add env pathlookup
|
|
|
|
|
"PI": number(math.Pi),
|
|
|
|
|
"E": number(math.E),
|
|
|
|
|
"sys-args": func(a ...expression) expression {
|
|
|
|
@ -2079,7 +2081,6 @@ var stdLibrary = vars{
|
|
|
|
|
if b, ok := a[2].(bool); !ok || (ok && b) {
|
|
|
|
|
return exception("'subprocess' was given an error redirection that is not an IOHandle or the boolean '#f'")
|
|
|
|
|
}
|
|
|
|
|
return exception("'subprocess' was given an error redirection that is not an IOHandle")
|
|
|
|
|
} else if !e1.Open {
|
|
|
|
|
return exception("'subprocess' was given an error redirection IOHandle that is already closed")
|
|
|
|
|
}
|
|
|
|
|