Stdin,stdout,stderr wehn to run mplayer in background
Run mplayer in background with no stdin,no stdout,no stderr.
Code:
~$ mplayer fly.mp3 0</dev/null 1>/dev/null 2>&1 & Code:
~$ mplayer fly.mp3 </dev/null >/dev/null 2>&1 & Code:
~$ mplayer fly.mp3 </dev/null & 2.Run mplayer in background with no stdout. Code:
~$ mplayer fly.mp3 1>/dev/null & why `mplayer fly.mp3 1>/dev/null &` can not run mplayer in background with no stdout? 3.Run mplayer in background with no stderror. Code:
~$ mplayer fly.mp3 2>/dev/null & |
what happens with '$ mplayer fly.mp3' or 'mpg123 fly.mp3'?
|
mplayer does read on stdin and write on both stdout and stderr. To send it in background you have to redirect its stdin.
Your commands redirecting only stdout or sdterr don't work because it halts waiting a stdin. As you saw if you redirect only stdin it works. |
All times are GMT -5. The time now is 09:47 PM. |