Index: trunk/psModules/src/extras/pmVisual.c
===================================================================
--- trunk/psModules/src/extras/pmVisual.c	(revision 25754)
+++ trunk/psModules/src/extras/pmVisual.c	(revision 28129)
@@ -86,20 +86,56 @@
 
 
+// ask the user to continue or not.  give up after 2 seconds.
+// XXX add option to turn on/off timeouts?
 bool pmVisualAskUser(bool *plotFlag)
 {
+    struct timeval timeout;
+    fd_set fdSet;
+    int status;
+
     char key[10];
     if (plotFlag) {
-	fprintf (stdout, "[c]ontinue? [s]kip the rest of these plots? [a]bort all visual plots? (c) ");
+	fprintf (stderr, "[p]ause? [c]ontinue? [s]kip the rest of these plots? [a]bort all visual plots? (c) ");
     } else {
-	fprintf (stdout, "[c]ontinue? [a]bort all visual plots? (c) ");
-    }
-    if (!fgets(key, 8, stdin)) {
-        psWarning("Unable to read option");
-    }
-    if (plotFlag && (key[0] == 's')) {
-        *plotFlag = false;
-    }
-    if (key[0] == 'a') {
-        isVisual = false;
+	fprintf (stderr, "[p]ause? [c]ontinue? [a]bort all visual plots? (c) ");
+    }
+
+    /* Wait up to 1.0 second for a response, then continue */
+    timeout.tv_sec = 2;
+    timeout.tv_usec = 0;
+
+    FD_ZERO (&fdSet);
+    FD_SET (STDIN_FILENO, &fdSet);
+
+    status = select (1, &fdSet, NULL, NULL, &timeout);
+    if (status <= 0) {
+	fprintf (stderr, "\n");
+	return true; // if no data, give up
+    }
+
+    while (true) {
+	if (!fgets(key, 8, stdin)) {
+	    psWarning("Unable to read option");
+	}
+	switch (key[0]) {
+	  case 's':
+	    if (plotFlag) *plotFlag = false;
+	    *plotFlag = false;
+	    return true;
+	  case 'a':
+	    isVisual = false;
+	    return true;
+	  case 'c':
+	  case '\n':
+	    return true;
+	  default:
+	    break;
+	}
+	
+	if (plotFlag) {
+	    fprintf (stderr, "[c]ontinue? [s]kip the rest of these plots? [a]bort all visual plots? (c) ");
+	} else {
+	    fprintf (stderr, "[c]ontinue? [a]bort all visual plots? (c) ");
+	}
     }
     return true;
