Re: Forks, slices and threads: Can you make GSlice deadlock?



On Fri, Dec 07, 2012 at 08:44:01PM +0000, Chris Vine wrote:
> ...
> So for your scheme to work, the parent before forking must be single
> threaded.

As I have learnt the hard way, this is not something I can ensure even
the program does not use any multi-threading itself because libraries
may.  Even apparently very innocent programs can exhibit weird
threading-related bugs.  And while it is a sort of gray area, starting
to use threads internally is rarely considered an ABI breakage.  So,
unfortunately, the conditions you listed can be reduced to ‘it will
never work’ in practice.

Anyway, I do not attempt to do this kind of fork & not-exec in real Gtk+
applications.   So I'm looking forward to a better solution for unit
tests which is discussed in the bugzilla bug mentioned by Matthias.

Regards,

Yeti



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]