[mpich2-commits] r4101 - mpich2/trunk/src/pm/hydra/pm/central

balaji at mcs.anl.gov balaji at mcs.anl.gov
Tue Mar 17 13:45:51 CDT 2009


Author: balaji
Date: 2009-03-17 13:45:51 -0500 (Tue, 17 Mar 2009)
New Revision: 4101

Modified:
   mpich2/trunk/src/pm/hydra/pm/central/proxy_cb.c
Log:
The size of the buffer passed to read was more than what the buffer
could hold. So, we were "losing" some data. This should fix ticket
#468.


Modified: mpich2/trunk/src/pm/hydra/pm/central/proxy_cb.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/central/proxy_cb.c	2009-03-17 17:16:23 UTC (rev 4100)
+++ mpich2/trunk/src/pm/hydra/pm/central/proxy_cb.c	2009-03-17 18:45:51 UTC (rev 4101)
@@ -32,7 +32,7 @@
         HYDU_ERR_POP(status, "unable to register fd\n");
     }
     else {      /* We got a command from mpiexec */
-        count = read(fd, &cmd, HYD_TMPBUF_SIZE);
+        count = read(fd, &cmd, sizeof(enum HYD_Proxy_cmds));
         if (count < 0) {
             HYDU_ERR_SETANDJUMP2(status, HYD_SOCK_ERROR, "read error on %d (%s)\n",
                                  fd, HYDU_String_error(errno));



More information about the mpich2-commits mailing list