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

Michael Barnes barnes at jlab.org
Wed Mar 25 13:06:14 MDT 2009


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

-- 
+-----------------------------------------------
| Michael Barnes
|
| Thomas Jefferson National Accelerator Facility
| 12000 Jefferson Ave.
| Newport News, VA 23606
| (757) 269-7634
+-----------------------------------------------


More information about the torquedev mailing list