Re: compiler optimization causing issues with glib

On Fri, Jun 1, 2012 at 11:30 AM, Simon McVittie
<simon mcvittie collabora co uk> wrote:
> On 01/06/12 16:43, Mike wrote:
>> The issue seems to somehow relate to calling fork.
> From GLib documentation (e.g.
> <>):
> "On Unix, the GLib mainloop is incompatible with fork(). Any program
> using the mainloop must either exec() or exit() from the child without
> returning to the mainloop."
>    S

If you read the example program, you will see in my test that I simply
call exit in the child -- that's it.  That meets your requirement.
This is a simplification of g_spawn_async (which is what I originally
used and had issues with) because that too caused me issues, and I
think this reduces the amount of code that could be at fault.


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