Re: [PATCH v2 13/14] daemon: use select() instead of poll()
- From
Erik Faye-Lund <kusmabite@googlemail.com>
- Date
- Jan 16, 2010, 09:14 UTC
- Message-ID
- <40aa078e1001160114k5ce0414et7cd645724973609b@mail.gmail.com>
- In-Reply-To
- <201001160908.33996.j6t@kdbg.org>
On Sat, Jan 16, 2010 at 9:08 AM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 11 quoted lines
> On Samstag, 16. Januar 2010, Erik Faye-Lund wrote: >> The problem with that is differentiating between pipes and sockets. >> GetFileType() returns FILE_TYPE_PIPE for sockets (ugh). I did find >> some code in gnulib that used WSAEnumNetworkEvents() to differentiate >> between them, but I find this quite hacky. > > Wouldn't it be possible to call getsockopt(), and if it returns ENOTSOCK > (WSAENOTSOCK), then it is a pipe? > > -- Hannes >
I read reports that this didn't work in Wine. Not that I care that much about Wine.
-- Erik "kusma" Faye-Lund