summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2014-09-25 20:18:35 +0300
committerEric Koegel <eric.koegel@gmail.com>2014-09-25 20:21:11 +0300
commit401c276c6035784fdd5104b83a743baaec65f5a2 (patch)
treec74e2da9ab702227989dfd115ac2f0bdef3dc0d2
parent77d39eb0314247e5e129ab53ae1da5d699be52ca (diff)
downloadxfce4-session-401c276c6035784fdd5104b83a743baaec65f5a2.tar.gz
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.
-rw-r--r--xfce4-session/xfsm-compat-gnome.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xfce4-session/xfsm-compat-gnome.c b/xfce4-session/xfsm-compat-gnome.c
index 05bd9622..35e96175 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");
}