comparison src/process.c @ 621:eca8812e61cd

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Fri, 24 Apr 1992 08:11:54 +0000
parents 63a8e7b3c547
children 2bb7f23b7ea5
comparison
equal deleted inserted replaced
620:88a29c720fa7 621:eca8812e61cd
401 else 401 else
402 return Fcopy_sequence (Fsymbol_name (symbol)); 402 return Fcopy_sequence (Fsymbol_name (symbol));
403 } 403 }
404 404
405 #ifdef HAVE_PTYS 405 #ifdef HAVE_PTYS
406 static pty_process; 406 static int pty_process;
407 407
408 /* Open an available pty, returning a file descriptor. 408 /* Open an available pty, returning a file descriptor.
409 Return -1 on failure. 409 Return -1 on failure.
410 The file name of the terminal corresponding to the pty 410 The file name of the terminal corresponding to the pty
411 is left in the variable pty_name. */ 411 is left in the variable pty_name. */
1801 to give it higher priority than subprocesses */ 1801 to give it higher priority than subprocesses */
1802 1802
1803 if (read_kbd && detect_input_pending ()) 1803 if (read_kbd && detect_input_pending ())
1804 break; 1804 break;
1805 1805
1806 #ifdef SIGIO
1806 /* If we think we have keyboard input waiting, but didn't get SIGIO 1807 /* If we think we have keyboard input waiting, but didn't get SIGIO
1807 go read it. This can happen with X on BSD after logging out. 1808 go read it. This can happen with X on BSD after logging out.
1808 In that case, there really is no input and no SIGIO, 1809 In that case, there really is no input and no SIGIO,
1809 but select says there is input. */ 1810 but select says there is input. */
1810 1811
1811 /* 1812 /*
1812 if (read_kbd && interrupt_input && (Available & fileno (stdin))) 1813 if (read_kbd && interrupt_input && (Available & fileno (stdin)))
1813 */ 1814 */
1814 if (read_kbd && interrupt_input && (FD_ISSET (fileno (stdin), &Available))) 1815 if (read_kbd && interrupt_input && (FD_ISSET (fileno (stdin), &Available)))
1815 kill (0, SIGIO); 1816 kill (0, SIGIO);
1817 #endif
1816 1818
1817 #ifdef vipc 1819 #ifdef vipc
1818 /* Check for connection from other process */ 1820 /* Check for connection from other process */
1819 1821
1820 if (Available & ChannelMask (comm_server)) 1822 if (Available & ChannelMask (comm_server))
2104 #else 2106 #else
2105 if (!setjmp (send_process_frame)) 2107 if (!setjmp (send_process_frame))
2106 while (len > 0) 2108 while (len > 0)
2107 { 2109 {
2108 int this = len; 2110 int this = len;
2111 SIGTYPE (*old_sigpipe)();
2112
2109 /* Don't send more than 500 bytes at a time. */ 2113 /* Don't send more than 500 bytes at a time. */
2110 if (this > 500) 2114 if (this > 500)
2111 this = 500; 2115 this = 500;
2112 signal (SIGPIPE, send_process_trap); 2116 old_sigpipe = signal (SIGPIPE, send_process_trap);
2113 rv = write (XFASTINT (XPROCESS (proc)->outfd), buf, this); 2117 rv = write (XFASTINT (XPROCESS (proc)->outfd), buf, this);
2114 signal (SIGPIPE, SIG_DFL); 2118 signal (SIGPIPE, old_sigpipe);
2115 if (rv < 0) 2119 if (rv < 0)
2116 { 2120 {
2117 if (0 2121 if (0
2118 #ifdef EWOULDBLOCK 2122 #ifdef EWOULDBLOCK
2119 || errno == EWOULDBLOCK 2123 || errno == EWOULDBLOCK