Skip to content
  • Allison Karlitskaya's avatar
    Stop checking for fork() across GMainContext · 7ab25865
    Allison Karlitskaya authored
    01ed78d5 introduced assertion checks for
    creating a main context, forking, and attempting to use the main context
    from the child side of the fork.
    
    Some code (such as gnome-keyring-daemon) daemonise after calling
    GMainContext.  That's probably still mostly safe since we still only
    have one side of the fork touching the context afterwards.
    
    This use case is still troubling, however, since if any worker threads
    have been created at the time of the fork(), we could end up in the
    classic situation of leaving some mutexes in a locked state when the
    other threads disappear from the copy of the image that the child gets.
    
    This will require some deeper thinking...
    7ab25865