summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex/engine.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-04-04 05:53:22 +0000
committerwpaul <wpaul@FreeBSD.org>1995-04-04 05:53:22 +0000
commit12dab28cef8a2ead03e7df17b15efd7d6ff71635 (patch)
treebf43a9197abd29dfeade9e79ae3c507eb3d5960b /lib/libc/regex/engine.c
parentfd72f57342162b4d6d9fddb7dbb789e23e3edf80 (diff)
downloadFreeBSD-src-12dab28cef8a2ead03e7df17b15efd7d6ff71635.zip
FreeBSD-src-12dab28cef8a2ead03e7df17b15efd7d6ff71635.tar.gz
'Fix' for esoteric misfeature discovered while searching for another bug:
select() returns EINVAL if you try to feed it a value of FD_SETSIZE greater that 256. You can apparently adjust this by specifying a larger value of FD_SETSIZE when configuring your kernel. However, if you set the maximum number of open file descriptors per process to some value greater than the FD_SETSIZE value that select() expects, many selects() within the RPC library code will be botched because _rpc_dtablesize() will return invalid numbers. This is to say that it will return the upper descriptor table size limit which can be much higher than 256. Unless select() is prepared to expect this 'unusually' high value, it will fail. (A good example of this can be seen with NIS enabled: if you type 'unlimit' at the shell prompt and then run any command that does NIS calls, you'll be bombarded with errors from clnttcp_create().) A temporary fix for this is to clamp the value returned by _rpc_dtablesize() at FD_SETSIZE (as defined in <sys/types.h> (256)). I suppose the Right Thing would be to provide some mechanism for select() to dynamically adjust itself to handle FD_SETSIZE values larger than 256, but it's a bit late in the game for that. Hopefully 256 file descriptors will be enough to keep RPC happy for now.
Diffstat (limited to 'lib/libc/regex/engine.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud