XWinrc configurable server (menus/icons)

Christopher Faylor cgf@redhat.com
Wed Aug 6 17:29:00 GMT 2003


On Wed, Aug 06, 2003 at 01:06:55PM -0400, Harold L Hunt II wrote:
>The for loop that you have is the way I have seen it done before.

Me too.  However, if you can find an API specification for something
which does something similar in the Single Unix Specification, I'd be
happy to implement it in the cygwin DLL.  It is trivial to do.  I just
want to provide a standard interface, if possible.  Couldn't find one in
my brief search of SUSv3.

cgf

>>That's the exact thing I was thinking about, but unfortunately I haven't
>>got a clue how to get a list of all open file descriptors under cygwin.
>>There's a Solaris function fdwalk(), but I don't think that's POSIX 
>>standard
>>or even available on cygwin.  I suppose after the fork() you could do:
>>  struct rlimit rl;
>>  int i;
>>  getrlimit(RLIMIT_NOFILE, &rl);
>>  for (i = STDERR_FILENO+1; i < rl.rlim_max; i++)
>>       (void) close(i);
>>but that seems wasteful to iterate over rlim_max...



More information about the Cygwin-xfree mailing list