[Xfce4-commits] [xfce/xfce4-session] 01/01: Don't log errors when trying to close non-existant FDs

noreply at xfce.org noreply at xfce.org
Thu Sep 25 19:26:00 CEST 2014


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfce4-session.

commit 401c276c6035784fdd5104b83a743baaec65f5a2
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Thu Sep 25 20:18:35 2014 +0300

    Don't log errors when trying to close non-existant FDs
    
    This just keeps the .xsession-errors log file from having around
    a thousand error messages when gnome-compat tries to close file
    descriptors that never existed. Other error messages will still
    properly show.
---
 xfce4-session/xfsm-compat-gnome.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xfce4-session/xfsm-compat-gnome.c b/xfce4-session/xfsm-compat-gnome.c
index 05bd962..35e9617 100644
--- a/xfce4-session/xfsm-compat-gnome.c
+++ b/xfce4-session/xfsm-compat-gnome.c
@@ -83,7 +83,8 @@ child_setup (gpointer user_data)
       if (fd != keyring_lifetime_pipe[0])
         {
           ret = fcntl (fd, F_SETFD, FD_CLOEXEC);
-          if (ret == -1)
+          /* We end up trying to close a lot of non-existant FDs here */
+          if (ret == -1 && errno != EBADF)
             {
               perror ("child_setup: fcntl (fd, F_SETFD, FD_CLOEXEC) failed");
             }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list