Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
897:7da79fbe37bb | 898:b0c24ea6a2a8 |
---|---|
2313 con = event_console_or_selected (event); | 2313 con = event_console_or_selected (event); |
2314 command_builder = XCOMMAND_BUILDER (con->command_builder); | 2314 command_builder = XCOMMAND_BUILDER (con->command_builder); |
2315 | 2315 |
2316 switch (XEVENT_TYPE (event)) | 2316 switch (XEVENT_TYPE (event)) |
2317 { | 2317 { |
2318 default: | |
2319 goto RETURN; | |
2320 case button_release_event: | 2318 case button_release_event: |
2321 case misc_user_event: | 2319 case misc_user_event: |
2322 /* don't echo menu accelerator keys */ | 2320 /* don't echo menu accelerator keys */ |
2323 reset_key_echo (command_builder, 1); | 2321 reset_key_echo (command_builder, 1); |
2324 goto EXECUTE_KEY; | 2322 goto EXECUTE_KEY; |
2325 case button_press_event: /* key or mouse input can trigger prompting */ | 2323 case button_press_event: /* key or mouse input can trigger prompting */ |
2326 goto STORE_AND_EXECUTE_KEY; | 2324 goto STORE_AND_EXECUTE_KEY; |
2327 case key_press_event: /* any key input can trigger autosave */ | 2325 case key_press_event: /* any key input can trigger autosave */ |
2328 break; | 2326 break; |
2327 default: | |
2328 goto RETURN; | |
2329 } | 2329 } |
2330 | 2330 |
2331 /* temporarily reenable quit checking here, because we could get stuck */ | 2331 /* temporarily reenable quit checking here, because we could get stuck */ |
2332 Vquit_flag = Qnil; /* see begin_dont_check_for_quit() */ | 2332 Vquit_flag = Qnil; /* see begin_dont_check_for_quit() */ |
2333 unbind_to (depth); | 2333 unbind_to (depth); |
3102 additional check in status_notify() to see whether a | 3102 additional check in status_notify() to see whether a |
3103 process has terminated. We must tell status_notify() | 3103 process has terminated. We must tell status_notify() |
3104 to enable that check, and we do so now. */ | 3104 to enable that check, and we do so now. */ |
3105 kick_status_notify (); | 3105 kick_status_notify (); |
3106 } | 3106 } |
3107 else | |
3108 { | |
3109 /* Deactivate network connection */ | |
3110 Lisp_Object status = Fprocess_status (p); | |
3111 if (EQ (status, Qopen) | |
3112 /* In case somebody changes the theory of whether to | |
3113 return open as opposed to run for network connection | |
3114 "processes"... */ | |
3115 || EQ (status, Qrun)) | |
3116 update_process_status (p, Qexit, 256, 0); | |
3117 deactivate_process (p); | |
3118 status_notify (); | |
3119 } | |
3107 | 3120 |
3108 /* We must call status_notify here to allow the | 3121 /* We must call status_notify here to allow the |
3109 event_stream->unselect_process_cb to be run if appropriate. | 3122 event_stream->unselect_process_cb to be run if appropriate. |
3110 Otherwise, dead fds may be selected for, and we will get a | 3123 Otherwise, dead fds may be selected for, and we will get a |
3111 continuous stream of process events for them. Since we don't | 3124 continuous stream of process events for them. Since we don't |
3115 have been closed before we read the last data from them. | 3128 have been closed before we read the last data from them. |
3116 It's safe for the filter to signal an error because | 3129 It's safe for the filter to signal an error because |
3117 status_notify() will be called on return to top-level. | 3130 status_notify() will be called on return to top-level. |
3118 */ | 3131 */ |
3119 status_notify (); | 3132 status_notify (); |
3120 return; | |
3121 } | 3133 } |
3134 return; | |
3122 } | 3135 } |
3123 | 3136 |
3124 case timeout_event: | 3137 case timeout_event: |
3125 { | 3138 { |
3126 Lisp_Event *e = XEVENT (event); | 3139 Lisp_Event *e = XEVENT (event); |