I am trying to create my own "shell" program.
Basically you would run it and give it a command (ifconfig
, ls
, etc) and it would run it via popen and then return the output.
The issue is I cannot get STDERR.
I have read that I can redirect stderr to stdout by using 2>&1
however I prefer to not do that since this will be ran across all sorts of different linux versions and shells.