I have an application that runs the a command as below:
<command> <switches> >& /dev/null
I can configure <command>
, but I have no control over <switches>
. All the output generated by this command goes to /dev/null
. I want the output to be visible on screen or redirected to a log file.
I tried to use freopen()
and related functions to reopen /dev/null
to another file, but could not get it working.
Do you have any other ideas? Is this possible at all?
Thanks for your time.
PS: I am working on Linux.