One approach that I just documented in the NEWS file is to use a shutdown
script. In KDE, we have ~/.kde/shutdown/ for this. I'll look into your
suggestion later. Right now I need to get my other packages in shape for
Jessie.

On Wed, Sep 10, 2014 at 4:21 PM, Laurent Bigonville <[email protected]>
wrote:

> Le Wed, 10 Sep 2014 15:32:10 +0530,
> Ritesh Raj Sarraf <[email protected]> a écrit :
>
> > On Monday 01 September 2014 05:12 PM, Laurent Bigonville wrote:
> > >> >Give me your thoughts here. The daemon gets started as the user
> > >> >logs in. I think I made it follow some fdo xdg stuff. Is there
> > >> >something similar for logout ??
> > >> >daemon(0,0);
> > > Are you sure that application started by xdg autostart can actually
> > > fork? I've the feeling that gnome-session is loosing track of the
> > > PID of the process (but this is a wild guess)
> >
> >
> > I have no idea about desktops. That's why I asked you.
> >
> > The other approach would be to do a check in within the daemon
> > itself. It would mean walking down the /proc file system and look for
> > the proc name. Ugly, but may work. May look at it in the future.
>
> I tried removing the call to daemon(3), same issue.
>
> Could be related to the use of system() command?
>
> Quoting the system(3) manpage:
>
>        As mentioned, system() ignores SIGINT and SIGQUIT.  This may make
> programs that call it from a loop uninterruptible, unless they take care
> themselves to check the exit  sta‐
>        tus of the child.  For example:
>            while (something) {
>                int ret = system("foo");
>
>                if (WIFSIGNALED(ret) &&
>                    (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) ==
>                SIGQUIT)) break;
>            }
>



-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

Reply via email to