caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Christoph Bauer" <christoph.bauer@lmsintl.com>
To: <caml-list@inria.fr>
Subject: in_channel_of_descr questions
Date: Wed, 25 Mar 2009 13:37:43 +0100	[thread overview]
Message-ID: <BB046CA812535C45BD0029AA9D04BA790627648E@KL-SRV57.lmsintl.com> (raw)

Hello,

I have some questions concerning in_channel_of_descr: my program
has a list of sockets. I need the sockets itself for a select-Loop
and an in_channel for the convenient input_line function. At the end,
which one should i close? Just the socket, just the channel or both?
On Windows I tried to create many in_channels, one for each block 
I read. Then I get soon an  "Too many open files in the system" error. 
In win32unix/channels.c I see an _open_osfhandle() call for each 
in_channel_of_descr. On unix the same program runs fine (as expected). 
So is there a different approach needed for windows e.g. close just 
the socket on unix, but close socket and in_channel
on windows? (In any case I'll remove the repeated call of 
in_channel_of_descr...).

Thanks for help,

Christoph Bauer


             reply	other threads:[~2009-03-25 12:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25 12:37 Christoph Bauer [this message]
2009-03-25 13:42 ` [Caml-list] " Olivier Andrieu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BB046CA812535C45BD0029AA9D04BA790627648E@KL-SRV57.lmsintl.com \
    --to=christoph.bauer@lmsintl.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).