Index: /trunk/Ohana/src/elixir/src/rconnect.c
===================================================================
--- /trunk/Ohana/src/elixir/src/rconnect.c	(revision 2803)
+++ /trunk/Ohana/src/elixir/src/rconnect.c	(revision 2804)
@@ -1,8 +1,8 @@
 # include "controller.h"
 /*
-# include <stdio.h> 
-# include <math.h>
-# include <string.h>
-# include <signal.h>
+  # include <stdio.h> 
+  # include <math.h>
+  # include <string.h>
+  # include <signal.h>
 */ 
 /* rconnect opens a remote shell on hostname and returns two file descriptors:
@@ -43,4 +43,5 @@
     setvbuf (stdout, (char *) NULL, _IONBF, BUFSIZ);
     setvbuf (stderr, (char *) NULL, _IONBF, BUFSIZ);
+    fprintf (stderr, "child is spawned\n");
 
     status = execl (command, file, hostname, "/bin/csh", 0); 
@@ -50,7 +51,7 @@
   *wsock = wfd[1];
   *rsock = rfd[0];
-   close (wfd[0]);
-   close (rfd[1]);
-
+  close (wfd[0]);
+  close (rfd[1]);
+   
   fcntl (*rsock, F_SETFL, O_NONBLOCK);
   fcntl (*wsock, F_SETFL, O_NONBLOCK);
@@ -67,7 +68,8 @@
   /* try to get evidence connection is alive - wait upto a few seconds */
   status = -1;
-  for (i = 0; (i < 100) && (status == -1); i++) {
+  for (i = 0; (i < 300) && (status == -1); i++) {
     fcntl (*rsock, F_SETFL, O_NONBLOCK);
     status = SockScan ("PTOLEMY STARTED", &fifo, *rsock);
+    if (!(i % 30)) fprintf (stderr, ".");
     if (status == 0) {
       fprintf (stderr, "socket closed unexpectedly\n");
@@ -77,5 +79,5 @@
     }
   }
-  if (i == 100) {
+  if (status == -1) {
     fprintf (stderr, "timeout while connecting\n");
     close (*wsock);
