diff src/event-stream.c @ 898:b0c24ea6a2a8

[xemacs-hg @ 2002-07-03 07:18:39 by michaels] 2002-07-01 Mike Sperber <mike@xemacs.org> * process-unix.c (unix_send_process): Mark coding_outstream as non-open upon SIGPIPE. * event-stream.c (execute_internal_event): Reinstate code to deactivate a dead network connection that got lost during the stdout/stderr separation. * event-stream.c (Fnext_event): Reorder switch cases to something that makes sense.
author michaels
date Wed, 03 Jul 2002 07:18:41 +0000
parents 79c6ff3eef26
children c925bacdda60
line wrap: on
line diff
--- a/src/event-stream.c	Tue Jul 02 19:09:31 2002 +0000
+++ b/src/event-stream.c	Wed Jul 03 07:18:41 2002 +0000
@@ -2315,8 +2315,6 @@
 
   switch (XEVENT_TYPE (event))
     {
-    default:
-      goto RETURN;
     case button_release_event:
     case misc_user_event:
       /* don't echo menu accelerator keys */
@@ -2326,6 +2324,8 @@
       goto STORE_AND_EXECUTE_KEY;
     case key_press_event:         /* any key input can trigger autosave */
       break;
+    default:
+      goto RETURN;
     }
 
   /* temporarily reenable quit checking here, because we could get stuck */
@@ -3104,6 +3104,19 @@
 		   to enable that check, and we do so now. */
 		kick_status_notify ();
 	      }
+	    else
+	      {
+		/* Deactivate network connection */
+		Lisp_Object status = Fprocess_status (p);
+		if (EQ (status, Qopen)
+		    /* In case somebody changes the theory of whether to
+		       return open as opposed to run for network connection
+		       "processes"... */
+		    || EQ (status, Qrun))
+		  update_process_status (p, Qexit, 256, 0);
+		deactivate_process (p);
+		status_notify ();
+	      }
 	    
 	    /* We must call status_notify here to allow the
 	       event_stream->unselect_process_cb to be run if appropriate.
@@ -3117,8 +3130,8 @@
 	       status_notify() will be called on return to top-level.
 	    */
 	    status_notify ();
-	    return;
 	  }
+	return;
       }
 
     case timeout_event: