Comment 2 for bug 1096975

Revision history for this message
Attila Fazekas (afazekas) wrote :

Yes the socket 3,6 in my example does not need to be there. It is completely unnecessary.

/dev/null usage is also interesting... , but let's say it is normal, because some funny library might have the idea to miss use the 0..2 .
[root@new32 ~]# ls -l /proc/5298/fd
total 0
lrwx------. 1 root root 64 Mar 13 11:58 0 -> /dev/null
lrwx------. 1 root root 64 Mar 13 11:58 1 -> /dev/null
lrwx------. 1 root root 64 Mar 13 11:58 2 -> /dev/null
lrwx------. 1 root root 64 Mar 13 11:58 3 -> socket:[1012889]
lrwx------. 1 root root 64 Mar 13 11:58 4 -> socket:[1012891]
lrwx------. 1 root root 64 Mar 13 11:58 5 -> socket:[1012897]
lrwx------. 1 root root 64 Mar 13 11:58 6 -> socket:[1012898]

[root@new32 ~]# exec 7>&1
[root@new32 ~]# exec 8>&1
[root@new32 ~]# exec 9>&1
[root@new32 ~]# exec 6>&1
[root@new32 ~]# exec 5>&1
[root@new32 ~]# swift-init restart all

ls -l /proc/6129/fd
total 0
lrwx------. 1 root root 64 Mar 13 12:08 0 -> /dev/null
lrwx------. 1 root root 64 Mar 13 12:08 1 -> /dev/null
lr-x------. 1 root root 64 Mar 13 12:08 10 -> pipe:[1017372]
lrwx------. 1 root root 64 Mar 13 12:08 11 -> socket:[1017447]
lrwx------. 1 root root 64 Mar 13 12:08 12 -> socket:[1017452]
lrwx------. 1 root root 64 Mar 13 12:08 13 -> socket:[1017494]
lrwx------. 1 root root 64 Mar 13 12:08 14 -> socket:[1017501]
lrwx------. 1 root root 64 Mar 13 12:08 15 -> socket:[1017504]
lrwx------. 1 root root 64 Mar 13 12:08 16 -> socket:[1017529]
lrwx------. 1 root root 64 Mar 13 12:08 2 -> /dev/null
lr-x------. 1 root root 64 Mar 13 12:08 3 -> pipe:[1017366]
lr-x------. 1 root root 64 Mar 13 12:08 4 -> pipe:[1017369]
lrwx------. 1 root root 64 Mar 13 12:08 5 -> /dev/pts/0
lrwx------. 1 root root 64 Mar 13 12:08 6 -> /dev/pts/0
lrwx------. 1 root root 64 Mar 13 12:08 7 -> /dev/pts/0
lrwx------. 1 root root 64 Mar 13 12:08 8 -> /dev/pts/0
lrwx------. 1 root root 64 Mar 13 12:08 9 -> /dev/pts/0

[root@new32 ~]# tty
/dev/pts/0

Looks like those /dev/pts/0 will be referenced in all child process and never will be used for anything useful.