When using sigaction() to install cntrl-c handler do not also use signal().
authorAndrew Cagney <cagney@redhat.com>
Mon, 15 Dec 1997 12:59:55 +0000 (12:59 +0000)
committerAndrew Cagney <cagney@redhat.com>
Mon, 15 Dec 1997 12:59:55 +0000 (12:59 +0000)
gdb/ChangeLog
gdb/remote-sim.c

index cc26113..2df0bba 100644 (file)
@@ -1,5 +1,9 @@
 Mon Dec 15 15:13:57 1997  Andrew Cagney  <cagney@b1.cygnus.com>
 
+       * remote-sim.c (gdbsim_wait): When HAVE_SIGACTION and SA_RESTART
+       intall cntrl-c handler with SA_RESTART clear.  On BSD systems this
+       stops read syscalls's being restarted.
+
        * configure.in (configdirs): Check for sigaction.
        * configure: Re-generate.
 
index 713e539..22b6565 100644 (file)
@@ -700,9 +700,8 @@ gdbsim_wait (pid, status)
     prev_sigint = osa.sa_handler;
   }
 #else
-  prev_sigint = signal (SIGINT, cntrl_c);
-#endif
   prev_sigint = signal (SIGINT, gdbsim_cntrl_c);
+#endif
   sim_resume (gdbsim_desc, resume_step,
              target_signal_to_host (resume_siggnal));
   signal (SIGINT, prev_sigint);