|
|
| termbios 2004-12-22, 9:13 pm |
| I get a FILE * pointer by calling popen. Now I want to change it into a
file descriptor. Is there a function call for it? Like fdopen create a
FILE* out of a file descriptor.
Thanks,
termbios
| |
| Chris McDonald 2004-12-22, 9:13 pm |
| "termbios" <meson@techemail.com> writes:
>I get a FILE * pointer by calling popen. Now I want to change it into a
>file descriptor. Is there a function call for it? Like fdopen create a
>FILE* out of a file descriptor.
You probably want int fileno(FILE *);
but it doesn't really "change" the file pointer to a descriptor -
it provides the descriptor associated with the already open file pointer.
--
Chris.
| |
|
|
| David Schwartz 2004-12-23, 4:11 am |
|
"termbios" <meson@techemail.com> wrote in message
news:1103757841.418156.85480@f14g2000cwb.googlegroups.com...
>I get a FILE * pointer by calling popen. Now I want to change it into a
> file descriptor. Is there a function call for it? Like fdopen create a
> FILE* out of a file descriptor.
Google for 'fileno'.
DS
|
|
|
|