popen noly redirect the STDIN and STDOUT, use
popen("ls -l 2>&1 ", "r");
will get the result in stderr. It's useful when the command execution encounter an error.
popen noly redirect the STDIN and STDOUT, use
popen("ls -l 2>&1 ", "r");
will get the result in stderr. It's useful when the command execution encounter an error.