On Mon, Mar 30, 2009 at 10:47 PM, lovelinux <xiaoaojianghu...@163.com> wrote:
>
> I design a program.it's always loop until.
> for example
> #include <stdio.h>
> #include <stdlib.h>
> int main(int argc,char** argv)
> {
>    while(1)
>         sleep(1);
>   return 0;
> }
> User logout desktop session,again login desktop session,this process still
> exists but look like not run.
> When logout desktop session,which signal will be send to all process?

No Unix signals are sent.  If you want to tie your program's lifecycle
to the desktop, connect to to either the X server using xlib, or the
DBus session bus (using libdbus, or a binding such as dbus-glib).
Both will by default call exit() when their connection is closed.
_______________________________________________
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Reply via email to