Closed saleyn closed 11 years ago
When using {stdout, stderr} redirection option, output is printed to screen instead of being delivered to the calling process:
{stdout, stderr}
6> f(I), {ok, _, I} = exec:run("echo TEST", [stderr, {stdout, stderr}]). {ok,<0.1396.0>,11509} 7> TEST 7> flush(). ok
Workaround: add 1>&2 redirect on command line:
1>&2
9> f(I), {ok, _, I} = exec:run("echo TEST 1>&2", [stderr]). {ok,<0.1399.0>,11510} 10> flush(). Shell got {stderr,11510,<<"TEST\n">>} ok
This issue doesn't affect the {stderr, stdout} redirection, which works correctly.
{stderr, stdout}
Fixed in last commit
When using
{stdout, stderr}
redirection option, output is printed to screen instead of being delivered to the calling process:Workaround: add
1>&2
redirect on command line:This issue doesn't affect the
{stderr, stdout}
redirection, which works correctly.