1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- To work around a bug in the Roadshow TCP/IP stack (since fixed), the waitselect()

function now substitutes a 10 microsecond timeout for a zero length timeout.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15189 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2008-04-16 07:53:40 +00:00
parent 4444438e8f
commit e7258bf939
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,6 @@
- To work around a bug in the Roadshow TCP/IP stack (since fixed), the waitselect()
function now substitutes a 10 microsecond timeout for a zero length timeout.
- isatty() no longer crashes if passed a socket rather than a file.
- Rewrote the GetRexxVar()/SetRexxVar() functions (mostly) in 'C', using available

View File

@ -1,5 +1,5 @@
/*
* $Id: socket_wait_select.c,v 1.3 2006-04-10 15:08:10 obarthel Exp $
* $Id: socket_wait_select.c,v 1.4 2008-04-16 07:53:40 obarthel Exp $
*
* :ts=4
*
@ -44,8 +44,22 @@
int
waitselect(int num_fds,fd_set *read_fds,fd_set *write_fds,fd_set *except_fds,struct timeval *timeout,unsigned long * signal_mask)
{
struct timeval other_timeout;
int result;
/* This is a workaround for a bug in the Roadshow TCP/IP stack which has been
fixed long ago: if a signal is received, as given in the 'signal_mask'
parameter, the WaitSelect() function may not detect it if the timeout
is zero. */
if(signal_mask != NULL && timeout != NULL && timeout->tv_secs == 0 && timeout->tv_micro == 0)
{
/* Substitute a ten microsecond timeout. */
other_timeout.tv_secs = 0;
other_timeout.tv_micro = 10000;
timeout = &other_timeout;
}
result = __select(num_fds,read_fds,write_fds,except_fds,timeout,signal_mask);
return(result);