summaryrefslogtreecommitdiff
path: root/gdb/inflow.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2008-12-16 11:15:57 +0000
committerTristan Gingold <gingold@adacore.com>2008-12-16 11:15:57 +0000
commitbfc8bde3ca5ed5e461bf3e34f7aa2247ad48fb79 (patch)
tree1344faca500fe6d64854024dcb9c6da6b8f8e202 /gdb/inflow.c
parent695adac1eccc081d2ce31c319b71a0e3df946f5e (diff)
downloadgdb-bfc8bde3ca5ed5e461bf3e34f7aa2247ad48fb79.tar.gz
2008-12-16 Tristan Gingold <gingold@adacore.com>
* inflow.c: Remove old_sigio, handle_sigio, old_fcntl_flags, set_sigio_trap, clear_sigio_trap definitions. * inferior.h: Remove set_sigio_trap and clear_sigio_trap declarations. * inf-ptrace.c (inf_ptrace_wait): Remove call to set_sigio_trap and clear_sigio_trap. * inf-ttrace.c (inf_ttrace_wait): Ditto. * linux-nat.c (linux_nat_wait): Ditto. * spu-linux-nat.c (spu_child_wait): Ditto. * rs6000-nat.c (rs6000_wait): Ditto. * target.c: Remove target_activity_function and target_activity_fd. * target.h: Remove target_activity_function and target_activity_fd declarations.
Diffstat (limited to 'gdb/inflow.c')
-rw-r--r--gdb/inflow.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/gdb/inflow.c b/gdb/inflow.c
index e82514e99d9..7c8f2f6b0d8 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -651,68 +651,6 @@ clear_sigint_trap (void)
}
}
-#if defined (SIGIO) && defined (FASYNC) && defined (FD_SET) && defined (F_SETOWN)
-static void (*old_sigio) ();
-
-static void
-handle_sigio (int signo)
-{
- int numfds;
- fd_set readfds;
-
- signal (SIGIO, handle_sigio);
-
- FD_ZERO (&readfds);
- FD_SET (target_activity_fd, &readfds);
- numfds = gdb_select (target_activity_fd + 1, &readfds, NULL, NULL, NULL);
- if (numfds >= 0 && FD_ISSET (target_activity_fd, &readfds))
- {
-#ifndef _WIN32
- if ((*target_activity_function) ())
- kill (PIDGET (inferior_ptid), SIGINT);
-#endif
- }
-}
-
-static int old_fcntl_flags;
-
-void
-set_sigio_trap (void)
-{
- if (target_activity_function)
- {
- old_sigio = (void (*)()) signal (SIGIO, handle_sigio);
- fcntl (target_activity_fd, F_SETOWN, getpid ());
- old_fcntl_flags = fcntl (target_activity_fd, F_GETFL, 0);
- fcntl (target_activity_fd, F_SETFL, old_fcntl_flags | FASYNC);
- }
-}
-
-void
-clear_sigio_trap (void)
-{
- if (target_activity_function)
- {
- signal (SIGIO, old_sigio);
- fcntl (target_activity_fd, F_SETFL, old_fcntl_flags);
- }
-}
-#else /* No SIGIO. */
-void
-set_sigio_trap (void)
-{
- if (target_activity_function)
- internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
-}
-
-void
-clear_sigio_trap (void)
-{
- if (target_activity_function)
- internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
-}
-#endif /* No SIGIO. */
-
/* Create a new session if the inferior will run in a different tty.
A session is UNIX's way of grouping processes that share a controlling