xfce-mcs-manager -> suggest signal poll interval == 1s

Jasper Huijsmans jasper at xfce.org
Thu May 24 08:57:19 CEST 2007


2007/5/24, Brian J. Tarricone <bjt23 at cornell.edu>:
> On Wed, 23 May 2007 22:44:16 -0700 Kok, Auke wrote:
>
> >
> > All,
> >
> > I suggest making the following change to xfce-mcs-manager.c:
> >
> > --- xfce-mcs-manager.c-org      2007-05-23 22:27:15.000000000 -0700
> > +++ xfce-mcs-manager.c  2007-05-23 22:21:39.000000000 -0700
> > @@ -454,7 +454,7 @@ main (int argc, char **argv)
> >           g_message ("Daemon mode disabled (for debug purpose
> > only!)");
> >
> >       /* Establish signal-check timer */
> > -    g_timeout_add (500, (GSourceFunc) check_signal_state, NULL);
> > +    g_timeout_add (1000, (GSourceFunc) check_signal_state, NULL);
> >
> >       gtk_main ();
>
> Actually, a better fix -- that would eliminate the polling completely --
> would be to have the signal handler write the status code to a pipe,
> and then have the glib mainloop watch the pipe.  Pretty sure writing to
> a pipe is one of the few things 'allowed' in a signal handler...

Ah, yes, I didn't realize the polling was for signal handling. For the
panel I now use a pipe and it seems to work well. Probably this timer
code was copied from the panel to xfce-mcs-manger, or the other way
around.

-- 
        Jasper



More information about the Xfce4-dev mailing list