changeset 573:f574c2c52beb trunk

[svn] - aosd: modified ghosd library source to ignore EINTR when polling
author giacomo
date Mon, 29 Jan 2007 08:38:56 -0800
parents a1d05f2435ae
children 664f68db1657
files ChangeLog src/aosd/aosd_cfg.c src/aosd/ghosd-main.c
diffstat 3 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jan 29 07:50:26 2007 -0800
+++ b/ChangeLog	Mon Jan 29 08:38:56 2007 -0800
@@ -1,3 +1,10 @@
+2007-01-29 15:50:26 +0000  Giacomo Lozito <james@develia.org>
+  revision [1230]
+  - aosd: paranoid fixes
+  trunk/src/aosd/aosd_cfg.c |    2 +-
+  1 file changed, 1 insertion(+), 1 deletion(-)
+
+
 2007-01-29 15:46:29 +0000  Giacomo Lozito <james@develia.org>
   revision [1228]
   - aosd: remove other skin_file manipulation
--- a/src/aosd/aosd_cfg.c	Mon Jan 29 07:50:26 2007 -0800
+++ b/src/aosd/aosd_cfg.c	Mon Jan 29 08:38:56 2007 -0800
@@ -93,7 +93,6 @@
   aosd_cfg_osd_t *cfg_osd = g_malloc0(sizeof(aosd_cfg_osd_t));
   cfg_osd->decoration.colors = g_array_sized_new( FALSE , TRUE , sizeof(aosd_color_t) ,
                                                   aosd_deco_style_get_max_numcol() );
-  cfg_osd->decoration.skin_file = NULL; /* TODO paranoid, remove me when implemented */
   return cfg_osd;
 }
 
@@ -265,6 +264,7 @@
        "decoration_skin_file" , &(cfg->osd->decoration.skin_file) ) )
     cfg->osd->decoration.skin_file = g_strdup( "" );
   */
+  cfg->osd->decoration.skin_file = NULL;
 
   /* decoration - colors */
   max_numcol = aosd_deco_style_get_max_numcol();
--- a/src/aosd/ghosd-main.c	Mon Jan 29 07:50:26 2007 -0800
+++ b/src/aosd/ghosd-main.c	Mon Jan 29 08:38:56 2007 -0800
@@ -11,6 +11,7 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
+#include <errno.h>
 
 #include "ghosd.h"
 #include "ghosd-internal.h"
@@ -70,8 +71,12 @@
     struct pollfd pollfd = { ghosd_get_socket(ghosd), POLLIN, 0 };
     int ret = poll(&pollfd, 1, dt);
     if (ret < 0) {
-      perror("poll");
-      exit(1);
+      if ( errno != EINTR )
+      {
+        perror("poll");
+        exit(1);
+      }
+      /* else go on, ignore EINTR */
     } else if (ret > 0) {
       ghosd_main_iterations(ghosd);
     } else {