summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian J. Tarricone <brian@tarricone.org>2009-09-24 14:09:05 -0700
committerBrian J. Tarricone <brian@tarricone.org>2009-09-24 14:10:25 -0700
commit647076bc2b7c53368c816049d6c6b597a1cb0ab1 (patch)
tree7d3f5a87620fe388b21866614ad1a132c7fbe90d
parenta4cf11e779feba9a93ae526648416f3d7cc8b3c6 (diff)
downloadxfce4-session-647076bc2b7c53368c816049d6c6b597a1cb0ab1.tar.gz
if it looks like the helper got killed, just return success (bug 4849)
-rw-r--r--xfce4-session/xfsm-shutdown-helper.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/xfce4-session/xfsm-shutdown-helper.c b/xfce4-session/xfsm-shutdown-helper.c
index cd9aa594..4e3d988b 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"),