[haiku-bugs] Re: [Haiku] #10958: Odd signal behavior when starting certain command line applications via Debugger

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Fri, 20 Jun 2014 22:15:01 -0000

#10958: Odd signal behavior when starting certain command line applications via
Debugger
-------------------------+----------------------------
   Reporter:  anevilyak  |      Owner:  nobody
       Type:  bug        |     Status:  new
   Priority:  normal     |  Milestone:  R1
  Component:  System     |    Version:  R1/Development
 Resolution:             |   Keywords:
 Blocked By:             |   Blocking:
Has a Patch:  0          |   Platform:  All
-------------------------+----------------------------

Comment (by bonefish):

 I think the issue might be the following: When the shell starts Debugger,
 it creates a new process group. Debugger starts the debugged program in
 the same process group. When Debugger quits, the shell reclaims the
 terminal (it only knows Debugger, but not its child), i.e. /bin/info's
 process group becomes a background process group. Trying to read something
 from the terminal therefore causes a SIGTTIN to be sent. I don't know off
 the top of my head, whether SIGTTIN would have to be blocked while the
 signal handler is executed (unless explicitly disabled via SA_NODEFER),
 but the recursion suggests that it isn't.

 Generally, it is entirely possible that this use case simply cannot work
 due to the missing relationship between shell and debugged program. I
 tried with gdb on Linux but I didn't manage to detach and quit gdb while
 the debugged program continued to run. kdbg creates a new terminal for the
 debugged program (and so do the debuggers in eclipse and QtCreator), so I
 don't know how to reproduce the situation on Linux.

--
Ticket URL: <https://dev.haiku-os.org/ticket/10958#comment:1>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: