Index: src/apps/kernel/linux/pvfs2-client-core.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/kernel/linux/pvfs2-client-core.c,v
retrieving revision 1.92
diff -u -a -p -r1.92 pvfs2-client-core.c
--- src/apps/kernel/linux/pvfs2-client-core.c	6 Mar 2008 20:40:59 -0000	1.92
+++ src/apps/kernel/linux/pvfs2-client-core.c	15 Apr 2008 16:22:02 -0000
@@ -92,7 +92,7 @@ typedef struct
     char* gossip_mask;
     int logstamp_type;
     int logstamp_type_set;
-    int standalone;
+    int child;
     /* kernel module buffer size settings */
     unsigned int dev_buffer_count;
     int dev_buffer_count_set;
@@ -3161,7 +3161,13 @@ int main(int argc, char **argv)
     memset(&s_opts, 0, sizeof(options_t));
     parse_args(argc, argv, &s_opts);
 
-    if(!s_opts.standalone)
+    signal(SIGHUP,  client_core_sig_handler);
+
+    /* we don't want to write a core file if we're running under
+     * the client parent process, because the client-core process
+     * could keep segfaulting, and the client would keep restarting it...
+     */
+    if(s_opts.child)
     {
         struct rlimit lim = {0,0};
 
@@ -3173,10 +3179,6 @@ int main(int argc, char **argv)
                     "continuing", ret);
         }
     }
-    else
-    {
-        signal(SIGHUP,  client_core_sig_handler);
-    }
 
     /* convert gossip mask if provided on command line */
     if (s_opts.gossip_mask)
@@ -3514,7 +3516,7 @@ static void parse_args(int argc, char **
         {"logfile",1,0,0},
         {"logtype",1,0,0},
         {"logstamp",1,0,0},
-        {"standalone",0,0,0},
+        {"child",0,0,0},
         {0,0,0,0}
     };
 
@@ -3689,9 +3691,9 @@ static void parse_args(int argc, char **
                 {
                     opts->gossip_mask = optarg;
                 }
-                else if (strcmp("standalone", cur_option) == 0)
+                else if (strcmp("child", cur_option) == 0)
                 {
-                    opts->standalone = 1;
+                    opts->child = 1;
                 }
                 break;
             case 'h':
Index: src/apps/kernel/linux/pvfs2-client.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/kernel/linux/pvfs2-client.c,v
retrieving revision 1.26
diff -u -a -p -r1.26 pvfs2-client.c
--- src/apps/kernel/linux/pvfs2-client.c	15 Feb 2008 19:17:24 -0000	1.26
+++ src/apps/kernel/linux/pvfs2-client.c	15 Apr 2008 16:22:02 -0000
@@ -38,6 +38,9 @@ static char s_client_core_path[PATH_MAX]
 
 #define DEFAULT_LOGFILE "/tmp/pvfs2-client.log"
 
+#define CLIENT_RESTART_INTERVAL_SECS 10
+#define CLIENT_MAX_RESTARTS 10
+
 typedef struct
 {
     int verbose;
@@ -172,6 +175,10 @@ static int monitor_pvfs2_client(options_
     int dev_init_failures = 0;
     char* arg_list[128] = {NULL};
     int arg_index;
+    int restart_count = 0;
+    struct timeval last_restart, now;
+
+    gettimeofday(&last_restart, NULL);
 
     assert(opts);
 
@@ -266,22 +273,42 @@ static int monitor_pvfs2_client(options_
             {
                 dev_init_failures = 0;
 
-                if (opts->verbose)
+                fprintf(stderr,
+                        "Child process with pid %d was killed by an "
+                       "uncaught signal %d\n", core_pid, WTERMSIG(ret));
+                core_pid = -1;
+
+                gettimeofday(&now, NULL);
+
+                if(((now.tv_sec + now.tv_usec*1e-6) -
+                    (last_restart.tv_sec + last_restart.tv_usec*1e-6))
+                   < CLIENT_RESTART_INTERVAL_SECS)
+                {
+                    if(restart_count > CLIENT_MAX_RESTARTS)
+                    {
+                        fprintf(stderr, "Chld process is restarting too quickly "
+                                "(within %d secs) after %d attempts! "
+                                "Aborting the client.\n",
+                                CLIENT_RESTART_INTERVAL_SECS, restart_count);
+                        exit(1);
+                    }
+                }
+                else
                 {
-                    printf("Child process with pid %d was killed by an "
-                           "uncaught signal %d\n", core_pid,
-                           WTERMSIG(ret));
+                    /* reset restart count */
+                    restart_count = 0;
                 }
-                core_pid = -1;
+
+                last_restart = now;
                 continue;
             }
         }
         else
         {
-            sleep(1);
-
             arg_list[0] = PVFS2_CLIENT_CORE_NAME;
             arg_index = 1;
+
+            arg_list[arg_index++] = "--child";
             arg_list[arg_index++] = "-a";
             arg_list[arg_index++] = opts->acache_timeout;
             arg_list[arg_index++] = "-n";
