[X2go-Commits] x2goserver.git - master (branch) updated: 3.0.99.10-31-g6d06ba1

X2go dev team git-admin at x2go.org
Wed Feb 22 09:04:37 CET 2012


The branch, master has been updated
       via  6d06ba1e3e965314e6a8753b11e69aeb45f8b5ad (commit)
      from  65b0817cef86ea0ee0085d539571bd4e689c6055 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6d06ba1e3e965314e6a8753b11e69aeb45f8b5ad
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Feb 22 08:54:39 2012 +0100

    Make sure x2gocleansessions close _all_ open file handles after forking as a daemon.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                  |    2 ++
 x2goserver/sbin/x2gocleansessions |    5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 4c36ff3..57a32f7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,8 @@ x2goserver (3.1.0.0-0~x2go1) UNRELEASED; urgency=low
     - Place quotations where appropriate into shell scripts.
     - Fix call to x2goterminate-desktopsharing in x2goruncommand.
     - Tolerate user names containing "-" characters (SQLite DB backend).
+    - Make sure x2gocleansessions close _all_ open file handles after
+      forking as a daemon.
   * Let x2goserver package suggest x2goserver-fmbindings.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 01 Feb 2012 13:45:00 +0100
diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions
index 963ab32..b3f65db 100755
--- a/x2goserver/sbin/x2gocleansessions
+++ b/x2goserver/sbin/x2gocleansessions
@@ -86,9 +86,8 @@ elsif ($pid != 0)
 }
 elsif ($pid == 0 )
 {
-	close(STDIN);
-	close(STDOUT);
-	close(STDERR);
+	# close any open file descriptor left open by our parent before the fork
+	for (glob "/proc/$$/fd/*") { POSIX::close($1) if m{/(\d+)$}; }
 
 	$SIG{TERM}=\&catch_term;
 


hooks/post-receive
-- 
x2goserver.git (X2Go Server)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goserver.git" (X2Go Server).




More information about the x2go-commits mailing list