[Xfce4-commits] <xfce4-session:master> 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:03 CEST 2009
Updating branch refs/heads/master
to f1b1f61c9929594652a3cbd48afda9312d5fb5a3 (commit)
from ade1bd188feb5a2d50b3a63138aa8fc03af5362b (commit)
commit f1b1f61c9929594652a3cbd48afda9312d5fb5a3
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 ce319e2..134a437 100644
--- a/xfce4-session/xfsm-shutdown-helper.c
+++ b/xfce4-session/xfsm-shutdown-helper.c
@@ -813,7 +813,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"),
@@ -824,7 +830,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