From: Vladimir Prus <ghost@cs.msu.su>
To: gdb@sources.redhat.com, Pedro Alves <pedro@codesourcery.com>
Cc: Hamish Rodda <rodda@kde.org>
Subject: SIGCHLD ignored
Date: Wed, 11 Jun 2008 17:21:00 -0000 [thread overview]
Message-ID: <200806112121.06783.ghost@cs.msu.su> (raw)
[-- 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);
next reply other threads:[~2008-06-11 17:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-11 17:21 Vladimir Prus [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200806112121.06783.ghost@cs.msu.su \
--to=ghost@cs.msu.su \
--cc=gdb@sources.redhat.com \
--cc=pedro@codesourcery.com \
--cc=rodda@kde.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox