This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Re: Getting a (FILE *) from a file descriptor
Ian Grant wrote:
> fp = fdopen(origfd)
>
> .
> . now we use fp to write to the file
> .
>
> tempfd = dup(origfd)
> flcose (fp)
> dup2(tempfd, origfd)
>
> Is this it?
That's what I had in mind. As for being thread safe, as you mention, if
you've got threads writing to the fd while using the buffered FILE
you've got other more important problems than worrying about thread
safe.