Does RUN also capture stderr?

Started by bprlhe, August 01, 2023, 15:52:25

Previous topic - Next topic

bprlhe

The document doesn't make it clear:

https://smallbasic.github.io/reference/818.html

QuoteIf RUN is called as a function, the return value s holds the text output of the executed command as a string.

Does this text output of the executed command also include stderr or only include stdout?

J7M

I did a little test (in Win10) to answer your question. I wrote a C-program which prints to stdout and stderr. After a call of that program with v=RUN("cmd /C test.exe") I got both outputs. Maybe at the weekend I can check with Linux, too.

bprlhe

What if I only want stderr or stdout?