🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #70

Re: fdclose function? Or something like it?

#70
From: Christopher R Volpe
Date: Tue, 21 Jul 1992 14:40
30 lines
1625 bytes
In article <JWA5Y3@geminix.in-berlin.de>, gemini@geminix.in-berlin.de (Uwe Doering) writes:
|> 
|> You could dup() the file descriptor at the beginning of your routine,
|> then associate this duplicated fd with a stream via fdopen(). At the
|> end of your routine you can fclose() this stream without closing the
|> socket connection because the original fd still holds it open. So
|> after this you can continue to write to the socket from elsewhere
|> in your program via the original fd that was before passed to your
|> routine.

Yep. Why I didn't see this at first I'll never know. 

|> 
|> Hope that helps.

It does. Thanks. And thanks to everyone else who responded via
posts/email.

|> 
|>       Uwe
|> -- 
|> Uwe Doering  |  INET : gemini@geminix.in-berlin.de
|> Berlin       |----------------------------------------------------------------
|> Germany      |  UUCP : ...!unido!fub!geminix.in-berlin.de!gemini

-- 
==================
Chris Volpe
G.E. Corporate R&D
volpecr@crd.ge.com
Technical Details
Message-ID: <1992Jul21.144058.18201@crd.ge.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!rpi!crdgw1!rdsunx.crd.ge.com!bart!volpe
References: <1992Jul20.201947.21749@crd.ge.com> <JWA5Y3@geminix.in-berlin.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!rpi!crdgw1!rdsunx.crd.ge.com!bart!volpe
From: volpe@bart.NoSubdomain.NoDomain (Christopher R Volpe)
Newsgroups: comp.unix.programmer
Subject: Re: fdclose function? Or something like it?
Message-ID: <1992Jul21.144058.18201@crd.ge.com>
Date: 21 Jul 92 14:40:58 GMT
Article-I.D.: crd.1992Jul21.144058.18201
References: <1992Jul20.201947.21749@crd.ge.com> <JWA5Y3@geminix.in-berlin.de>
Sender: volpe@bart (Christopher R Volpe)
Reply-To: volpe@ausable.crd.ge.com
Organization: GE Corporate Research & Development
Lines: 30
Nntp-Posting-Host: bart.crd.ge.com