File * to fd
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > File * to fd




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    File * to fd  
termbios


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-22-04 10:54 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






[ Post a follow-up to this message ]



    Re: File * to fd  
Chris McDonald


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-22-04 10:54 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.





[ Post a follow-up to this message ]



    Re: File * to fd  
moi


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-23-04 01:54 AM

fileno()







[ Post a follow-up to this message ]



    Re: File * to fd  
David Schwartz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-23-04 01:54 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







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:14 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register