git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 13/14] daemon: use select() instead of poll()

From
Erik Faye-Lund <kusmabite@googlemail.com>
Date
Jan 16, 2010, 11:05 UTC
Message-ID
<40aa078e1001160305y17b46a6dtc4959e5255c7acae@mail.gmail.com>
In-Reply-To
<201001161138.36535.j6t@kdbg.org>
On Sat, Jan 16, 2010 at 11:38 AM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 26 quoted lines
> On Samstag, 16. Januar 2010, Erik Faye-Lund wrote:
>> On Sat, Jan 16, 2010 at 9:06 AM, Johannes Sixt <j6t@kdbg.org> wrote:
>> > On Samstag, 16. Januar 2010, Erik Faye-Lund wrote:
>> >> +static inline void mingw_fd_set(int fd, fd_set *set)
>> >> +{
>> >> +     FD_SET(_get_osfhandle(fd), set);
>> >> +}
>> >>  #undef FD_SET
>> >> +#define FD_SET(a,b) mingw_fd_set(a,b)
>> >> +
>> >>  #undef FD_ISSET
>> >>  #define FD_ISSET(fd, set) __WSAFDIsSet(_get_osfhandle(fd), (fd_set
>> >> *)(set))
>> >
>> > Ah, yes, how obvious ;) You are going to do the same with FD_ISSET as
>> > well, aren't you?
>>
>> Do I really need to? There's already a single function for that, with
>> no "ugly hidden internals" there; __WSAFDIsSet() is documented in
>> MSDN. I mean, Sure... I could... I just don't see the point.
>
> __WSAFDIsSet is "ugly hidden internals" and we should not rely on it when we
> can use the official FD_ISSET for our own FD_ISSET.
>
> -- Hannes
>

...but __WSAFDIsSet() seems to be every bit as official on Windows as FD_ISSET() (documented in msdn, without any notes not to use it), so I still don't really see the point.

However, I don't personally care one way or the other, so just doing it is probably less work than convincing you that I don't have to ;)

-- 
Erik "kusma" Faye-Lund
Previous: Johannes SixtNext: Andreas Schwab
Message 38 of 49 in “daemon-win32”
  1. 00/14 daemon-win32Erik Faye-Lund, Jan 15, 2010
  2. 01/14 mingw: add network-wrappers for daemonErik Faye-Lund, Jan 15, 2010
  3. 02/14 mingw: implement syslogErik Faye-Lund, Jan 15, 2010
  4. Janos LaubeJan 15, 2010
  5. Erik Faye-LundJan 15, 2010
  6. Janos LaubeJan 15, 2010
  7. 03/14 compat: add inet_pton and inet_ntop prototypesErik Faye-Lund, Jan 15, 2010
  8. 04/14 inet_ntop: fix a couple of old-style declsErik Faye-Lund, Jan 15, 2010
  9. 05/14 mingw: support waitpid with pid > 0 and WNOHANGErik Faye-Lund, Jan 15, 2010
  10. Johannes SixtJan 15, 2010
  11. Erik Faye-LundJan 16, 2010
  12. 06/14 mingw: use real pidErik Faye-Lund, Jan 15, 2010
  13. Johannes SixtJan 15, 2010
  14. Erik Faye-LundJan 15, 2010
  15. Johannes SixtJan 16, 2010
  16. Erik Faye-LundJan 16, 2010
  17. Erik Faye-LundJan 18, 2010
  18. Johannes SixtJan 19, 2010
  19. Erik Faye-LundJan 19, 2010
  20. 07/14 mingw: add kill emulationErik Faye-Lund, Jan 15, 2010
  21. Johannes SixtJan 15, 2010
  22. Erik Faye-LundJan 16, 2010
  23. 08/14 daemon: use explicit file descriptorErik Faye-Lund, Jan 15, 2010
  24. Johannes SixtJan 15, 2010
  25. Erik Faye-LundJan 16, 2010
  26. 09/14 daemon: use run-command api for async servingErik Faye-Lund, Jan 15, 2010
  27. Johannes SixtJan 15, 2010
  28. 10/14 daemon: use full buffered mode for stderrErik Faye-Lund, Jan 15, 2010
  29. 11/14 mingw: compile git-daemonErik Faye-Lund, Jan 15, 2010
  30. 12/14 Improve the mingw getaddrinfo stub to handle more use casesErik Faye-Lund, Jan 15, 2010
  31. 13/14 daemon: use select() instead of poll()Erik Faye-Lund, Jan 15, 2010
  32. Johannes SixtJan 15, 2010
  33. Erik Faye-LundJan 15, 2010
  34. Erik Faye-LundJan 15, 2010
  35. Johannes SixtJan 16, 2010
  36. Erik Faye-LundJan 16, 2010
  37. Johannes SixtJan 16, 2010
  38. Erik Faye-LundJan 16, 2010
  39. Andreas SchwabJan 16, 2010
  40. Erik Faye-LundJan 16, 2010
  41. Johannes SixtJan 16, 2010
  42. Erik Faye-LundJan 16, 2010
  43. Johannes SixtJan 16, 2010
  44. Erik Faye-LundJan 16, 2010
  45. Johannes SixtJan 16, 2010
  46. Erik Faye-LundJan 16, 2010
  47. 14/14 daemon: report connection from root-processErik Faye-Lund, Jan 15, 2010
  48. Johannes SixtJan 15, 2010
  49. Erik Faye-LundJan 15, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.