Re: compiler optimization causing issues with glib
- From: Mike <puffy taco gmail com>
- To: Simon McVittie <simon mcvittie collabora co uk>
- Cc: gtk-devel-list gnome org
- Subject: Re: compiler optimization causing issues with glib
- Date: Fri, 1 Jun 2012 11:33:37 -0500
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.
> <http://developer.gnome.org/glib/2.32/glib-The-Main-Event-Loop.html>):
>
> "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.
Mike
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]