Article 6H47K file descriptors

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
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments