This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: XWinrc configurable server (menus/icons)
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin-xfree at cygwin dot com
- Date: Wed, 6 Aug 2003 13:29:18 -0400
- Subject: Re: XWinrc configurable server (menus/icons)
- References: <20030806165246.F31561C55B@mail03.powweb.com> <3F3135AF.5020404@msu.edu>
- Reply-to: cygwin-xfree at cygwin dot com
- Reply-to: cygwin-xfree at cygwin dot com
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...