Use fileno(): The fileno() function returns the integer file descriptor associated with the named stream; see open(2). #include <stdio.h> int fileno(FILE *stream); This message posted from opensolaris.org