[Xfce4-commits] <xfce4-session:xfce-4.6> if it looks like the helper got killed, just return success (bug 4849)

Brian J. Tarricone noreply at xfce.org
Thu Sep 24 23:12:01 CEST 2009


Updating branch refs/heads/xfce-4.6
         to 647076bc2b7c53368c816049d6c6b597a1cb0ab1 (commit)
       from a4cf11e779feba9a93ae526648416f3d7cc8b3c6 (commit)

commit 647076bc2b7c53368c816049d6c6b597a1cb0ab1
Author: Brian J. Tarricone <brian at tarricone.org>
Date:   Thu Sep 24 14:09:05 2009 -0700

    if it looks like the helper got killed, just return success (bug 4849)

 xfce4-session/xfsm-shutdown-helper.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/xfce4-session/xfsm-shutdown-helper.c b/xfce4-session/xfsm-shutdown-helper.c
index cd9aa59..4e3d988 100644
--- a/xfce4-session/xfsm-shutdown-helper.c
+++ b/xfce4-session/xfsm-shutdown-helper.c
@@ -554,7 +554,13 @@ xfsm_shutdown_helper_send_command (XfsmShutdownHelper *helper,
 
       if (ferror (helper->outfile))
         {
-          if (error && errno != EINTR)
+          if (errno == EINTR)
+            {
+              /* probably succeeded but the helper got killed */
+              return TRUE;
+            }
+
+          if (error)
             {
               g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
                            _("Error sending command to shutdown helper: %s"),
@@ -565,7 +571,13 @@ xfsm_shutdown_helper_send_command (XfsmShutdownHelper *helper,
 
       if (fgets (response, 256, helper->infile) == NULL)
         {
-          if (error && errno != EINTR)
+          if (errno == EINTR)
+            {
+              /* probably succeeded but the helper got killed */
+              return TRUE;
+            }
+
+          if (error)
             {
               g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
                            _("Error receiving response from shutdown helper: %s"),



More information about the Xfce4-commits mailing list