Debian Jessie
Tcl version 8.6
Bash 4.3.30
Kernel 3.16.0-4-amd64
I am lost as far as it concerns output redirection. And about the actual command passed to the shell as well.
This is the Tcl code:
dict set station ppid [exec /usr/bin/mplayer -novideo -dumpstream $uri -dumpfile $fn </dev/null &>/dev/null &]
As far as I can see with &>/dev/null I redirect all output to /dev/null. But when I run the Tcl application I still see the song title and number of bytes written as output of my Tcl program.
Only when I run tclsh myprogram.tcl > /dev/null the output disappears.
However, when I execute mplayer directly in the shell, no output is visible. It seems that the output of mplayer is first sent back the the tcl application and then /dev/null is considered.
Likewise, when I omit "< /dev/null" in the exec call, mplayer does not run. When I run mplayer on the command line without "< /dev/null" it runs fine.
And this is what I see using ps:
/usr/bin/mplayer -novideo -dumpstream
http://194.232.200.147:8000 -dumpfile /home/jlinkels/.mp_radio/orf_salzburg_1524008156-1524008156.mp3 &>/dev/null
So my input redirection has disappeared. The output redirector is still there, but mplayer's output is still passed back into its parent.
According to this article
http://wiki.tcl.tk/1039 redirection should work just fine.
Where is my lack of understanding?
jlinkels