aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 544bebeaeda..4d0a4462578 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -720,7 +720,7 @@ init_pty ()
720} 720}
721 721
722int 722int
723copy_from_to (int in, int out) 723copy_from_to (int in, int out, int sigio)
724{ 724{
725 static char buf[BUFSIZ]; 725 static char buf[BUFSIZ];
726 int nread = read (in, &buf, BUFSIZ); 726 int nread = read (in, &buf, BUFSIZ);
@@ -740,6 +740,9 @@ copy_from_to (int in, int out)
740 740
741 if (r < 0) 741 if (r < 0)
742 return 0; 742 return 0;
743
744 if (sigio && emacs_pid)
745 kill (emacs_pid, SIGIO);
743 } 746 }
744 return 1; 747 return 1;
745} 748}
@@ -774,7 +777,7 @@ pty_conversation (FILE *in)
774 if (FD_ISSET (master, &rset)) 777 if (FD_ISSET (master, &rset))
775 { 778 {
776 /* Copy Emacs output to stdout. */ 779 /* Copy Emacs output to stdout. */
777 if (! copy_from_to (master, 0)) 780 if (! copy_from_to (master, 0, 0))
778 { 781 {
779 FD_CLR (master, &set); 782 FD_CLR (master, &set);
780 } 783 }
@@ -782,7 +785,7 @@ pty_conversation (FILE *in)
782 if (FD_ISSET (1, &rset)) 785 if (FD_ISSET (1, &rset))
783 { 786 {
784 /* Forward user input to Emacs. */ 787 /* Forward user input to Emacs. */
785 if (! copy_from_to (1, master)) 788 if (! copy_from_to (1, master, 1))
786 { 789 {
787 FD_CLR (master, &set); 790 FD_CLR (master, &set);
788 } 791 }