Re[3]: [PATCH] use proper value for the first argument of select ()
- From: Pavel Tsekov <ptsekov gmx net>
- To: Pavel Roskin <proski gnu org>
- Cc: mc-devel gnome org
- Subject: Re[3]: [PATCH] use proper value for the first argument of select ()
- Date: Sat, 24 Aug 2002 20:36:54 +0200
Hello, Pavel!
Saturday, August 24, 2002, 8:16:01 PM, you wrote:
>> 1. Use the attached bad.tar.gz archive
PR> Thanks. If applied the patch for check_error_pipe(). Now I'd like to see
PR> a comment for the rest of the patch.
Well, this is the right way to call select (). You can check APUE to answer
you question - the first parameter is given as "maxfdp" there,
meaning maximum file descriptor number plus one.
There is more practical reason though - the patch can speed up
select () because the first argument is used as a hint when select ()
should stop scanning the fd_set arguments. If we have FD_SETSIZE
defined 1024 lets say and we pass 2 descriptors with numbers 4 and 8,
select() would have to iterate 1024 times the fd_set arrays - if we
set it to 9 it would have to make only 9 iterations.
I think this is reasonable patch but I won't die if it is not
accepted :)
To answer your question how I've tested it - I haven't made a special
testcase. I just ran MC and worked for a while - I haven't seen
anything broken, have you ?
PR> Answering your other e-mail, you can try to get rid on mc_doublepopen() if
PR> you want. but make sure to explain why it's good and how you tested the
PR> patch.
Sure.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]