This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: invoking GDB from FE and signals


On Sun, May 14, 2006 at 12:16:53AM -0400, Daniel Jacobowitz wrote:
> On Sun, May 14, 2006 at 09:57:00AM +1200, Nick Roberts wrote:
> > does it do when SIGINT is read" (which is sent by ~c^c).  Well it just works
> > like it does in a terminal but then I was surprised when Daniel said:
> > 
> >     When the inferior is running and you press Control-C, the signal goes to
> >     the inferior, not to GDB.
> > 
> > because I had thought it was the other way round and GDB could decide whether
> > to pass the signal on to the inferior or not according to the output of
> > "info signal".
> 
> Job control signals are funny.  The C-c sends a signal to the process
> group in control of the current terminal, and when the inferior is
> running, GDB makes sure that it "owns" the terminal (so that it won't
> e.g. be automatically stopped with SIGTTIN if it tries to read()).
> 
> This all predates 'set tty' of course.

O, right. The tty command. I definatly use that for the inferior which I
believe emacs does not. Nick, do you know if emacs uses the 'set tty'
command?

Daniel, can you think of how this would effect signal handling? In
particular the 'kill (gdb_pid, SIGINT)' I send to GDB, only when the
inferior is running, shuts down GDB. This could of course be because the
inferior is dieing. What do you think?

Thanks,
Bob Rossi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]