ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 59898] Wrapper script argument processing broken on Solaris
Date Thu, 03 Nov 2016 13:56:51 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=59898

Koen Wilde <kwilde@bol.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kwilde@bol.com

--- Comment #4 from Koen Wilde <kwilde@bol.com> ---
Created attachment 34416
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34416&action=edit
[PATCH] Use poll(2) in posix nb_connect

This issue is caused by limitations of the select(2) system call. From the
(linux) manpage:

> POSIX allows an implementation to define an upper limit, advertised via the
> constant FD_SETSIZE, on the range of file descriptors that can be specified
> in a file descriptor set.  The Linux kernel imposes no fixed limit, but the
> glibc implementation makes fd_set a fixed-size type, with FD_SETSIZE defined
> as 1024, and the FD_*() macros operating according to that limit.  To
> monitor file descriptors greater than 1023, use poll(2) instead.

As Michiel already noted, poll(2) is already imported in jk_connect.c, so using
poll(2) doesn't add any new dependencies.

I've attached a patch that uses poll(2) if it is available at compile time;
otherwise it falls back to the current select(2) implementation.

On the long run, it would probably be preferable to use some kind of event
library like libuv or libevent that abstracts over the kernel interface, and
automatically uses the optimal one available (e.g. epoll on linux and kqueue on
FreeBSD). This would both improve portability and performance, and possibly
code simplicity.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message