[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Backport from HEAD:



Update of /home/or/cvsroot/tor/debian
In directory moria.mit.edu:/tmp/cvs-serv29648

Modified Files:
      Tag: debian_branch_0_0_9
	changelog tor.default tor.init 
Log Message:
Backport from HEAD:
 - Set ulimit for file descriptors to 4096
 - Use SIGINT to shutdown tor

Index: changelog
===================================================================
RCS file: /home/or/cvsroot/tor/debian/changelog,v
retrieving revision 1.87.2.1
retrieving revision 1.87.2.2
diff -u -d -r1.87.2.1 -r1.87.2.2
--- changelog	23 Jan 2005 15:13:34 -0000	1.87.2.1
+++ changelog	3 Feb 2005 23:21:35 -0000	1.87.2.2
@@ -1,3 +1,16 @@
+tor (0.0.9.4-1) unstable; urgency=low
+
+  * New upstream version.
+  * Set ulimit for file descriptors to 4096 in our init
+    script.
+  * Use SIGINT to shutdown tor.  That way - if you are a server -
+    tor will stop accepting new connections immediately, and
+    give existing connections a grace period of 30 seconds in
+    which they might complete their task.  If you just run a
+    client it should make no difference.
+
+ -- Peter Palfrader <weasel@xxxxxxxxxx>  Fri,  4 Feb 2005 00:20:25 +0100
+
 tor (0.0.9.3-1) unstable; urgency=low
 
   * New upstream version.

Index: tor.default
===================================================================
RCS file: /home/or/cvsroot/tor/debian/tor.default,v
retrieving revision 1.3
retrieving revision 1.3.6.1
diff -u -d -r1.3 -r1.3.6.1
--- tor.default	6 Aug 2004 22:36:07 -0000	1.3
+++ tor.default	3 Feb 2005 23:21:36 -0000	1.3.6.1
@@ -8,6 +8,13 @@
 RUN_DAEMON="yes"
 
 #
+# Servers sometimes may need more than the default 1024 file descriptors
+# if they are very busy and have many clients connected to them.
+#  (ulimit -n)
+#
+MAX_FILEDESCRIPTORS=4096
+
+#
 # Uncomment this if you want to get coredumps
 #
 ulimit -c unlimited

Index: tor.init
===================================================================
RCS file: /home/or/cvsroot/tor/debian/tor.init,v
retrieving revision 1.9
retrieving revision 1.9.4.1
diff -u -d -r1.9 -r1.9.4.1
--- tor.init	12 Nov 2004 17:34:02 -0000	1.9
+++ tor.init	3 Feb 2005 23:21:36 -0000	1.9.4.1
@@ -8,8 +8,9 @@
 DESC="tor daemon"
 TORPID=/var/run/tor/tor.pid
 DEFAULTSFILE=/etc/default/$NAME
-WAITFORDAEMON=10
+WAITFORDAEMON=35
 ARGS=""
+MAX_FILEDESCRIPTORS=4096
 
 test -x $DAEMON || exit 0
 
@@ -49,6 +50,7 @@
 		echo "Not starting $DESC (Disabled in $DEFAULTSFILE)."
 	else
 		echo "Starting $DESC: $NAME..."
+		ulimit -n $MAX_FILEDESCRIPTORS
 		start-stop-daemon --start --quiet --oknodo \
 			--chuid debian-tor:debian-tor \
 			--pidfile $TORPID \
@@ -62,7 +64,7 @@
 	if test ! -f $TORPID -o -z "$pid"
 	then
 		echo "not running (there is no $TORPID)."
-	elif start-stop-daemon --stop --quiet --pidfile $TORPID --exec $DAEMON
+	elif start-stop-daemon --stop --signal INT --quiet --pidfile $TORPID --exec $DAEMON
 	then
 		wait_for_deaddaemon $pid
 		echo "$NAME."