Index: trunk/Ohana/src/opihi/lib.shell/opihi.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/opihi.c	(revision 2800)
+++ trunk/Ohana/src/opihi/lib.shell/opihi.c	(revision 3211)
@@ -6,4 +6,5 @@
   int i, Nbad, Nlist, status;
   char **list, *line, *outline, *prompt, *history;
+  pid_t ppid;
 
   initialize (argc, argv);
@@ -19,4 +20,10 @@
     line = readline (prompt);
     if (line == NULL) { 
+      
+      ppid = getppid();
+      if (ppid == 1) {
+	fprintf (stderr, "caught parent shutdown\n");
+	exit (2);
+      }
       if (!isatty (STDIN_FILENO)) exit (2);
       fprintf (stdout, "Use \"quit\" to exit\n");
