doubt about GFileMonitor


    I am having some trouble when using GFileMonitor (GIO) with more
than 1 process.
    Here is what I do:

1 - I create a GFileMonitor to monitor a directory, using the function
2 - I connect to the changed signal
3 - it works correctly when I have one single process
4 - I fork() my process
5 - in my child process, I free the monitor by using g_object_unref,
but in the parent process the monitor is still there
6 - my "changed" signal callback stops being called on file events.

    Does someone know why this happens? Is this expected to be like
this? I looked at the documentation and it says there:
"The signal will be emitted in the thread-default main context of the
thread that the monitor was created in (though if the global default
main context is blocked, this may cause notifications to be blocked
even if the thread-default context is still running"

    But it is still unclear to me, because I created another process
and not another thread.

Thanks in advance.
Marcelo Elias Del Valle

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