[torquedev] poll() vs select() in torque

Josh Butikofer josh at clusterresources.com
Wed Mar 25 13:19:59 MDT 2009


Hmmmm...I don't know how those snuck past. The repository has these lines of 
code in it already. We must have made the patch incorrectly.

In any case, good catch. :)

Josh Butikofer
Cluster Resources, Inc.
#############################


Michael Barnes wrote:
> On Wed, Mar 25, 2009 at 11:46:02AM -0600, Josh Butikofer wrote:
>> Michael,
>>
>> The discussed patch is attached.
>>
>> This patch is actually already checked into 2.3-fixes (was put there
>> yesterday), but we are still evaluating whether or not to leave it
>> in. We will want to have more people test it in the wild than the few
>> customers of ours that already have been using it in production.
>>
>> If you use this patch, please let us know how it works for you.
> 
> Thanks Josh.  I've only glanced at the patch, but it seems OK to me.
> 
> Like you said earlier, I think that it would be better in the long
> run to use a more efficient algorithm.
> 
> Thanks again.
> 
> BTW, I also noticed a missed replacement of the FD_SETSIZE:
> 
> --- src/lib/Libnet/rm.c (revision 2835)
> +++ src/lib/Libnet/rm.c (revision 2836)
> @@ -1084,20 +1089,22 @@
>        {
>        pbs_errno = errno;
> 
> +      free(FDSet);
>        return(-1);
>        }
>      else
>        {
> 
> -      FD_SET(rpp_fd, &fdset);
> +      FD_SET(rpp_fd, FDSet);
>        tv.tv_sec = 5;
>        tv.tv_usec = 0;
> -      num = select(FD_SETSIZE, &fdset, NULL, NULL, &tv);
> +      num = select(FD_SETSIZE, FDSet, NULL, NULL, &tv);
> 
> 
> -mb
> 


More information about the torquedev mailing list