[Ilugc] File Descriptors

  • From: mrugeshkarnik@xxxxxxxxx (Mrugesh Karnik)
  • Date: Mon Feb 4 22:27:32 2008

On Thursday 10 Jan 2008 16:27:31 Girish Venkatachalam wrote:

AFAIK only 0,1 and 2 matter. A good place to look would be
/usr/include/stdio.h or /usr/inculude/fcntl.h

There are also open(2) and fopen(3) #defines.

STDIN and STDIN_FILENO. Ditto for the other two.

You can also take a look at dup(2) and dup2(2).

For someone who doesn't know C, I found the info in O'Reilly's Understanding 
the Linux Kernel pretty helpful.

-- 
----------------------------------------
Mrugesh Karnik
GPG Key 0xBA6F1DA8
Public key on http://wwwkeys.pgp.net
----------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : 
http://www.ae.iitm.ac.in/pipermail/ilugc/attachments/20080204/3c0316b3/attachment.bin

Other related posts: