Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* SIGCHLD ignored
@ 2008-06-11 17:21 Vladimir Prus
  2008-06-11 17:36 ` Daniel Jacobowitz
  2008-06-11 22:45 ` Pedro Alves
  0 siblings, 2 replies; 6+ messages in thread
From: Vladimir Prus @ 2008-06-11 17:21 UTC (permalink / raw)
  To: gdb, Pedro Alves; +Cc: Hamish Rodda

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]


A fellow KDevelop hacker has reported that when running kdevelop itself
under CVS HEAD of gdb, kdevelop hangs. What happens if that kdevelop spawns
subprocess, and then does not notice it has exited, because it never
receives SIGCHLD. I attach a much reduced project that requires only Qt4,
and probably an even more reduced project is possible.

If I apply the attached patch to GDB, things work fine -- but I suspect
this 'fix' will break something else. 

Pedro, I think this SIGCHLD magic is your doing -- do you have any ideas
how to fix it? 

Thanks,
Volodya

[-- Attachment #2: hang.tar --]
[-- Type: application/x-tar, Size: 20480 bytes --]

[-- Attachment #3: workaround.diff --]
[-- Type: text/x-diff, Size: 689 bytes --]

diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 47dac59..8e62718 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -4248,12 +4248,14 @@ Tells gdb whether to control the GNU/Linux inferior in asynchronous mode."),
 			   &maintenance_set_cmdlist,
 			   &maintenance_show_cmdlist);
 
+#if 0
   /* Block SIGCHLD by default.  Doing this early prevents it getting
      unblocked if an exception is thrown due to an error while the
      inferior is starting (sigsetjmp/siglongjmp).  */
   sigemptyset (&mask);
   sigaddset (&mask, SIGCHLD);
   sigprocmask (SIG_BLOCK, &mask, NULL);
+#endif
 
   /* Save this mask as the default.  */
   sigprocmask (SIG_SETMASK, NULL, &normal_mask);

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-06-11 23:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-11 17:21 SIGCHLD ignored Vladimir Prus
2008-06-11 17:36 ` Daniel Jacobowitz
2008-06-11 18:09   ` Vladimir Prus
2008-06-11 18:42     ` Michael Snyder
2008-06-11 22:45 ` Pedro Alves
2008-06-11 23:20   ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox