From 7e6f3f2478ddb5194dc842a016658319dad1099d Mon Sep 17 00:00:00 2001 From: kraxel Date: Fri, 9 Dec 2005 17:17:29 +0000 Subject: - add console support. --- xenwatch.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'xenwatch.c') diff --git a/xenwatch.c b/xenwatch.c index 2a13a65..84e4ba0 100644 --- a/xenwatch.c +++ b/xenwatch.c @@ -3,19 +3,41 @@ #include #include #include +#include #include +#include +#include +#include #include #include "xenviews.h" /* ------------------------------------------------------------------ */ +static Display *dpy; + +static void sigchild(int signr) +{ + fprintf(stderr,"SIGCHILD\n"); +} + +/* ------------------------------------------------------------------ */ + int main(int argc, char *argv[]) { + struct sigaction act, old; + setlocale(LC_ALL,""); + + memset(&act, 0, sizeof(act)); + act.sa_handler = sigchild; + sigaction(SIGCHLD, &act, &old); + gtk_init(&argc, &argv); + dpy = gdk_x11_display_get_xdisplay(gdk_display_get_default()); + fcntl(ConnectionNumber(dpy),F_SETFD,FD_CLOEXEC); xen_doms_create_window(); gtk_widget_show_all(xd_toplevel); -- cgit