home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / programm / 3824 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  1.5 KB

  1. Path: sparky!uunet!ogicse!uwm.edu!rpi!crdgw1!rdsunx.crd.ge.com!bart!volpe
  2. From: volpe@bart.NoSubdomain.NoDomain (Christopher R Volpe)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Re: fdclose function? Or something like it?
  5. Message-ID: <1992Jul21.144058.18201@crd.ge.com>
  6. Date: 21 Jul 92 14:40:58 GMT
  7. Article-I.D.: crd.1992Jul21.144058.18201
  8. References: <1992Jul20.201947.21749@crd.ge.com> <JWA5Y3@geminix.in-berlin.de>
  9. Sender: volpe@bart (Christopher R Volpe)
  10. Reply-To: volpe@ausable.crd.ge.com
  11. Organization: GE Corporate Research & Development
  12. Lines: 30
  13. Nntp-Posting-Host: bart.crd.ge.com
  14.  
  15. In article <JWA5Y3@geminix.in-berlin.de>, gemini@geminix.in-berlin.de (Uwe Doering) writes:
  16. |> 
  17. |> You could dup() the file descriptor at the beginning of your routine,
  18. |> then associate this duplicated fd with a stream via fdopen(). At the
  19. |> end of your routine you can fclose() this stream without closing the
  20. |> socket connection because the original fd still holds it open. So
  21. |> after this you can continue to write to the socket from elsewhere
  22. |> in your program via the original fd that was before passed to your
  23. |> routine.
  24.  
  25. Yep. Why I didn't see this at first I'll never know. 
  26.  
  27. |> 
  28. |> Hope that helps.
  29.  
  30. It does. Thanks. And thanks to everyone else who responded via
  31. posts/email.
  32.  
  33. |> 
  34. |>       Uwe
  35. |> -- 
  36. |> Uwe Doering  |  INET : gemini@geminix.in-berlin.de
  37. |> Berlin       |----------------------------------------------------------------
  38. |> Germany      |  UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
  39.  
  40. -- 
  41. ==================
  42. Chris Volpe
  43. G.E. Corporate R&D
  44. volpecr@crd.ge.com
  45.