[PATCH] use proper value for the first argument of select ()
Pavel Tsekov
ptsekov at gmx.net
Sat Aug 24 14:14:38 UTC 2002
Hello, there! :)
The attached patch changes all select () calls in MC which look like
this - select (FD_SETSIZE, ...) - to select (max_fd + 1, ...).
While searching for such call I found the following code in
src/utilunix.c:
FD_ZERO (&select_set);
FD_SET (error_pipe[0], &select_set);
timeout.tv_sec = 0;
timeout.tv_usec = 0;
select (FD_SETSIZE, &select_set, 0, 0, &timeout);
>>>>> if (!FD_ISSET (0, &select_set))
break;
read (error_pipe[0], error + len, 1);
The marked line seemed wrong to me and I've changed it to:
if (!FD_ISSET (error_pipe[0], &select_set))
That change is also included in the patch.
Thanks!
Pavel Tsekov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mc-select-1st-arg.diff
Type: application/octet-stream
Size: 4683 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20020824/ecac1a4d/attachment.obj>
More information about the mc-devel
mailing list