Last active
October 14, 2015 11:32
-
-
Save zjiekai/40b678906d052a12f042 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t.sh | |
while true | |
do | |
echo "stderr $(date)" 1>&2 | |
echo "stdout $(date)" | |
done | |
bash /tmp/t.sh 2>&1 1>/tmp/output | sleep 9999 | |
可以发现/tmp/output文件的大小并未不断增长,可知进程阻塞 | |
$ dd if=/dev/zero bs=1 | sleep 9999 | |
ctrl-C 后会显示缓冲区的大小 | |
关于重定向 | |
http://stackoverflow.com/a/18342079/264442 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment