comparison src/process.c @ 104316:bb8ce3c842e7

* process.c (status_notify): Don't perform redisplay. (Fdelete_process, list_processes_1, process_send_signal): Expliticly perform redisplay. (wait_reading_process_output): Always check process status, but don't perform redisplay unless DO_DISPLAY is non-zero (Bug#2930).
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 17 Aug 2009 21:04:05 +0000
parents a812c049e63c
children fec993ec6e85
comparison
equal deleted inserted replaced
104315:9ff366a7ccc0 104316:bb8ce3c842e7
784 if (NETCONN1_P (p) || SERIALCONN1_P (p)) 784 if (NETCONN1_P (p) || SERIALCONN1_P (p))
785 { 785 {
786 p->status = Fcons (Qexit, Fcons (make_number (0), Qnil)); 786 p->status = Fcons (Qexit, Fcons (make_number (0), Qnil));
787 p->tick = ++process_tick; 787 p->tick = ++process_tick;
788 status_notify (p); 788 status_notify (p);
789 redisplay_preserve_echo_area (13);
789 } 790 }
790 else if (p->infd >= 0) 791 else if (p->infd >= 0)
791 { 792 {
792 #ifdef SIGCHLD 793 #ifdef SIGCHLD
793 Lisp_Object symbol; 794 Lisp_Object symbol;
815 /* Do this now, since remove_process will make sigchld_handler do nothing. */ 816 /* Do this now, since remove_process will make sigchld_handler do nothing. */
816 p->status 817 p->status
817 = Fcons (Qsignal, Fcons (make_number (SIGKILL), Qnil)); 818 = Fcons (Qsignal, Fcons (make_number (SIGKILL), Qnil));
818 p->tick = ++process_tick; 819 p->tick = ++process_tick;
819 status_notify (p); 820 status_notify (p);
821 redisplay_preserve_echo_area (13);
820 } 822 }
821 } 823 }
822 remove_process (process); 824 remove_process (process);
823 return Qnil; 825 return Qnil;
824 } 826 }
1541 } 1543 }
1542 insert_string ("\n"); 1544 insert_string ("\n");
1543 } 1545 }
1544 } 1546 }
1545 if (exited) 1547 if (exited)
1546 status_notify (NULL); 1548 {
1549 status_notify (NULL);
1550 redisplay_preserve_echo_area (13);
1551 }
1547 return Qnil; 1552 return Qnil;
1548 } 1553 }
1549 1554
1550 DEFUN ("list-processes", Flist_processes, Slist_processes, 0, 1, "P", 1555 DEFUN ("list-processes", Flist_processes, Slist_processes, 0, 1, "P",
1551 doc: /* Display a list of all processes. 1556 doc: /* Display a list of all processes.
4754 set_waiting_for_input (&timeout); 4759 set_waiting_for_input (&timeout);
4755 4760
4756 /* If status of something has changed, and no input is 4761 /* If status of something has changed, and no input is
4757 available, notify the user of the change right away. After 4762 available, notify the user of the change right away. After
4758 this explicit check, we'll let the SIGCHLD handler zap 4763 this explicit check, we'll let the SIGCHLD handler zap
4759 timeout to get our attention. When Emacs is run 4764 timeout to get our attention. */
4760 interactively, only do this with a nonzero DO_DISPLAY 4765 if (update_tick != process_tick)
4761 argument, because status_notify triggers redisplay. */
4762 if (update_tick != process_tick
4763 && (do_display || noninteractive))
4764 { 4766 {
4765 SELECT_TYPE Atemp; 4767 SELECT_TYPE Atemp;
4766 #ifdef NON_BLOCKING_CONNECT 4768 #ifdef NON_BLOCKING_CONNECT
4767 SELECT_TYPE Ctemp; 4769 SELECT_TYPE Ctemp;
4768 #endif 4770 #endif
4784 { 4786 {
4785 /* It's okay for us to do this and then continue with 4787 /* It's okay for us to do this and then continue with
4786 the loop, since timeout has already been zeroed out. */ 4788 the loop, since timeout has already been zeroed out. */
4787 clear_waiting_for_input (); 4789 clear_waiting_for_input ();
4788 status_notify (NULL); 4790 status_notify (NULL);
4791 if (do_display) redisplay_preserve_echo_area (13);
4789 } 4792 }
4790 } 4793 }
4791 4794
4792 /* Don't wait for output from a non-running process. Just 4795 /* Don't wait for output from a non-running process. Just
4793 read whatever data has already been received. */ 4796 read whatever data has already been received. */
6199 case SIGCONT: 6202 case SIGCONT:
6200 p->raw_status_new = 0; 6203 p->raw_status_new = 0;
6201 p->status = Qrun; 6204 p->status = Qrun;
6202 p->tick = ++process_tick; 6205 p->tick = ++process_tick;
6203 if (!nomsg) 6206 if (!nomsg)
6204 status_notify (NULL); 6207 {
6208 status_notify (NULL);
6209 redisplay_preserve_echo_area (13);
6210 }
6205 break; 6211 break;
6206 #endif /* ! defined (SIGCONT) */ 6212 #endif /* ! defined (SIGCONT) */
6207 case SIGINT: 6213 case SIGINT:
6208 case SIGQUIT: 6214 case SIGQUIT:
6209 case SIGKILL: 6215 case SIGKILL:
7013 } 7019 }
7014 } 7020 }
7015 } /* end for */ 7021 } /* end for */
7016 7022
7017 update_mode_lines++; /* in case buffers use %s in mode-line-format */ 7023 update_mode_lines++; /* in case buffers use %s in mode-line-format */
7018 redisplay_preserve_echo_area (13);
7019
7020 UNGCPRO; 7024 UNGCPRO;
7021 } 7025 }
7022 7026
7023 7027
7024 DEFUN ("set-process-coding-system", Fset_process_coding_system, 7028 DEFUN ("set-process-coding-system", Fset_process_coding_system,