stuff_char (c)
char c;
{
+ if (read_socket_hook)
+ return;
+
/* Should perhaps error if in batch mode */
#ifdef TIOCSTI
ioctl (input_fd, TIOCSTI, &c);
#endif /* not VMS */
#endif /* subprocesses */
-
-/*ARGSUSED*/
-setpgrp_of_tty (pid)
- int pid;
-{
- EMACS_SET_TTY_PGRP (input_fd, &pid);
-}
\f
/* Record a signal code and the handler for it. */
struct save_signal
int old_fcntl_flags;
-init_sigio ()
+init_sigio (fd)
+ int fd;
{
#ifdef FASYNC
- old_fcntl_flags = fcntl (input_fd, F_GETFL, 0) & ~FASYNC;
+ old_fcntl_flags = fcntl (fd, F_GETFL, 0) & ~FASYNC;
+ fcntl (fd, F_SETFL, old_fcntl_flags | FASYNC);
#endif
- request_sigio ();
+ interrupts_deferred = 0;
}
reset_sigio ()
request_sigio ()
{
+ if (read_socket_hook)
+ return;
+
#ifdef SIGWINCH
sigunblock (sigmask (SIGWINCH));
#endif
unrequest_sigio ()
{
+ if (read_socket_hook)
+ return;
+
#ifdef SIGWINCH
sigblock (sigmask (SIGWINCH));
#endif
request_sigio ()
{
int on = 1;
+
+ if (read_socket_hook)
+ return;
+
ioctl (input_fd, FIOASYNC, &on);
interrupts_deferred = 0;
}
{
int off = 0;
+ if (read_socket_hook)
+ return;
+
ioctl (input_fd, FIOASYNC, &off);
interrupts_deferred = 1;
}
int on = 1;
sigset_t st;
+ if (read_socket_hook)
+ return;
+
sigemptyset(&st);
sigaddset(&st, SIGIO);
ioctl (input_fd, FIOASYNC, &on);
{
int off = 0;
+ if (read_socket_hook)
+ return;
+
ioctl (input_fd, FIOASYNC, &off);
interrupts_deferred = 1;
}
request_sigio ()
{
+ if (read_socket_hook)
+ return;
+
croak ("request_sigio");
}
unrequest_sigio ()
{
+ if (read_socket_hook)
+ return;
+
croak ("unrequest_sigio");
}
narrow_foreground_group ();
#endif
- EMACS_GET_TTY (input_fd, &old_tty);
-
#ifdef HAVE_X_WINDOWS
/* Emacs' window system on MSDOG uses the `internal terminal' and therefore
needs the initialization code below. */
if (!read_socket_hook && EQ (Vwindow_system, Qnil))
#endif
{
+ EMACS_GET_TTY (input_fd, &old_tty);
+
tty = old_tty;
#if defined (HAVE_TERMIO) || defined (HAVE_TERMIOS)
{
old_fcntl_owner = fcntl (input_fd, F_GETOWN, 0);
fcntl (input_fd, F_SETOWN, getpid ());
- init_sigio ();
+ init_sigio (input_fd);
}
#endif /* F_GETOWN */
#endif /* F_SETOWN_BUG */
#ifdef BSD4_1
if (interrupt_input)
- init_sigio ();
+ init_sigio (input_fd);
#endif
#ifdef VMS /* VMS sometimes has this symbol but lacks setvbuf. */
SYS$WAITFR (timer_ef); /* Wait for timer expiry only */
}
-init_sigio ()
+init_sigio (fd)
+ int fd;
{
request_sigio ();
}
return open (path, oflag);
}
-init_sigio ()
+init_sigio (fd)
+ int fd;
{
if (noninteractive)
return;
lmode = LINTRUP | lmode;
- ioctl (0, TIOCLSET, &lmode);
+ ioctl (fd, TIOCLSET, &lmode);
}
reset_sigio ()