[Ilugc] File Descriptors

  • From: ambuj.mbp@xxxxxxxxx (Ambuj Thacker)
  • Date: Thu Jan 10 16:14:05 2008

Hello,
  I have a doubt which i am unable to solve.It is about the File
Descriptors.In all the places that I have searched for the answer they have
specified only 3 file descriptors:-
0-->stdin
1-->stdout*
*2-->stderr

I opened vi editor in one tty and in other i went to /proc/<pid of vi>/fd
and saw 4 fd those were 0,1,2 and 3.. Iknow about 0,1,2 but I could not make
out the what does 3 stands for?? It was a link to the .swp file.. Is 3
descriptor for the Read file?? Where can I find 'good' info about file
descriptors?/

Thakns in advance..

Regards,
Ambuj A Thacker

Other related posts: