This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH][PR guile/17247] Block SIGCHLD while initializing Guile
- From: ludo at gnu dot org (Ludovic CourtÃs)
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Doug Evans <xdje42 at gmail dot com>, guile-devel at gnu dot org, gdb-patches at sourceware dot org
- Date: Fri, 05 Sep 2014 13:50:37 +0200
- 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> <83a96ee9lk dot fsf at gnu dot org>
Eli Zaretskii <firstname.lastname@example.org> skribis:
>> From: Doug Evans <email@example.com>
>> Cc: firstname.lastname@example.org, email@example.com, firstname.lastname@example.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.
What Guile provides is a configure-time switch to disable threads (the
default is to enable threads.) However, I would find it unacceptable to
require GDB users to have a specially-configured Guile.
What I would suggest is to strongly warn against the use of threads in
the manual. If users ignore that warning, I think itâs their problem.
We might be able to annihilate thread functionality, for instance by
âset!âing the relevant bindings in Guile when GDB starts up. But thatâs
fragile and it misses the point: that users are free to run whatever
code they want anyway, and have plenty of other ways to mess up with GDB
(the same applies to Python extensions.)
(Besides, I agree with Pedro that the long-term vision should be to
eventually permit multi-threaded extensions, although I understand that
it wonât happen overnight.)