This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][PR guile/17247] Block SIGCHLD while initializing Guile
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Doug Evans <xdje42 at gmail dot com>
- Cc: ludo at gnu dot org, guile-devel at gnu dot org, gdb-patches at sourceware dot org
- Date: Fri, 05 Sep 2014 11:48:39 +0300
- Subject: Re: [PATCH][PR guile/17247] Block SIGCHLD while initializing Guile
- Authentication-results: sourceware.org; auth=none
- References: <m31trwv5o1 dot fsf at sspiff dot org> <834mwsh2nu dot fsf at gnu dot org> <CAP9bCMTNsoi6AhQxJtzjc6=o9iHi8TXkX32OiKbArAuAnsjZUQ at mail dot gmail dot com> <8338ccgj78 dot fsf at gnu dot org> <87ppffabw8 dot fsf at gnu dot org> <83y4u3flr2 dot fsf at gnu dot org> <87r3zv71qy dot fsf at gnu dot org> <83vbp7fer3 dot fsf at gnu dot org> <CAP9bCMR_=pCw9mF6CDFBnf0J+_Rw9AZAhVh8pFEizjyVWJ1+dw at mail dot gmail dot com> <83iol6f3iy dot fsf at gnu dot org> <m3lhpytqvf dot fsf at sspiff dot org>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Doug Evans <xdje42@gmail.com>
> Cc: ludo@gnu.org, guile-devel@gnu.org, gdb-patches@sourceware.org
> Date: Fri, 05 Sep 2014 01:26:28 -0700
>
> we can't physically prevent [users] from starting threads.
Of course we can: if Guile gives us a way to disable threads, any user
extension that attempts to start a thread will simply fail.
> We pretty much leave them that way already given the myriad
> of things they can do to mess up gdb without threads.
?? The rest of GDB is compiled C code which users cannot change
without recompiling. And it's a single-threaded code. And it's under
our close scrutiny. So I see no problems here.
> The python side of things is too silent on whether threads are supported
> there.
> https://sourceware.org/gdb/current/onlinedocs/gdb/Basic-Python.html#Basic-Python
I simply don't know enough about Python to discuss this; I do know
about Guile. If Python extensions can start threads, then the same
considerations apply there. And if the Python side didn't disallow
that until now, it doesn't sound like a good excuse to add insult to
injury on the Guile side.
> At any rate, the task at hand is getting gdb to work well with Guile,
> regardless of whether the user starts any threads,
> and that's the intent of the patch.
If we disable threads, this patch is unneeded, as are all the future
patches I envision that will have to deal with these issues. We kill
the problem cleanly and once and for all. From where I stand, it's a
no-brainer.
> I am happy to make the default value of GC_MARKERS be 1 (regardless
> of libgc version, and if not already set by the user) when initializing Guile,
> that will disable libgc marker threads.
That'd be fine with me, thanks.