file descriptors
by jt1122 from LinuxQuestions.org on (#6H47K)
Hi
I'm using debian with xfce4-terminal.
Code:ls /dev/fd
lr-x------ 1 pc pc 64 2023-12-13 10:21 3 -> /proc/94877/fd
lrwx------ 1 pc pc 64 2023-12-13 10:21 0 -> /dev/pts/11
l-wx------ 1 pc pc 64 2023-12-13 10:21 1 -> pipe:[19194926]
lrwx------ 1 pc pc 64 2023-12-13 10:21 2 -> /dev/pts/111. why isn't fd 1 pointing to /dev/pts/11 and instead pointing to a pipe?.
2. if I close fd 3 the terminal closes - why?.
I didn't "open" fd 3 manually for reading/writing so it's not clear why is it even enabled.
Thanks
I'm using debian with xfce4-terminal.
Code:ls /dev/fd
lr-x------ 1 pc pc 64 2023-12-13 10:21 3 -> /proc/94877/fd
lrwx------ 1 pc pc 64 2023-12-13 10:21 0 -> /dev/pts/11
l-wx------ 1 pc pc 64 2023-12-13 10:21 1 -> pipe:[19194926]
lrwx------ 1 pc pc 64 2023-12-13 10:21 2 -> /dev/pts/111. why isn't fd 1 pointing to /dev/pts/11 and instead pointing to a pipe?.
2. if I close fd 3 the terminal closes - why?.
I didn't "open" fd 3 manually for reading/writing so it's not clear why is it even enabled.
Thanks