Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 在本例中,/proc/self/fd/4会发生什么变化?_Linux_Proc - Fatal编程技术网

Linux 在本例中,/proc/self/fd/4会发生什么变化?

Linux 在本例中,/proc/self/fd/4会发生什么变化?,linux,proc,Linux,Proc,对于bash 3.00.15(1): $ls/proc/self/fd 4在我的Debian/Sid上echo | ls-l/proc/self/fd 4>&1显示了fd 4,既有zsh和bashshell,也有sash $ ls /proc/self/fd 4<&1 0 1 2 3 4 $ echo | ls /proc/self/fd 4<&1 0 1 2 3 4 $ ls() { /bin/ls $*; } $ ls /proc/self/fd 4<&am

对于bash 3.00.15(1):


$ls/proc/self/fd 4在我的Debian/Sid上
echo | ls-l/proc/self/fd 4>&1
显示了fd 4,既有
zsh
bash
shell,也有
sash
$ ls /proc/self/fd 4<&1
0 1 2 3 4
$ echo | ls /proc/self/fd 4<&1
0 1 2 3 4
$ ls() { /bin/ls $*; }
$ ls /proc/self/fd 4<&1
0 1 2 3 4
$ echo | ls /proc/self/fd 4<&1   # Unexpected output
0 1 2 3