[tor-commits] [torbrowser/master] [Linux] Complain properly when both 'tor' and 'vidalia' are running

erinn at torproject.org erinn at torproject.org
Sun Oct 23 23:18:27 UTC 2011


commit c9b2015f0ff13c2fd794c671190977ad2dd3fb9d
Author: Robert Ransom <rransom.8774 at gmail.com>
Date:   Wed Aug 24 01:51:18 2011 -0400

    [Linux] Complain properly when both 'tor' and 'vidalia' are running
    
    There is now an unfortunate blank line at the beginning of the message;
    I don't know how to fix it with plain POSIX sh.
    (cherry picked from commit 59e48ff7af775140a3209f52aef8640de1da7ead)
---
 src/RelativeLink/RelativeLink.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/RelativeLink/RelativeLink.sh b/src/RelativeLink/RelativeLink.sh
index 708b68e..e5239a6 100755
--- a/src/RelativeLink/RelativeLink.sh
+++ b/src/RelativeLink/RelativeLink.sh
@@ -106,18 +106,18 @@ export DYLD_PRINT_LIBRARIES
 
 # if any relevant processes are running, inform the user and exit cleanly
 RUNNING=0
+RUNNING_MESSAGE=""
 for process in tor vidalia
         # FIXME pidof isn't POSIX
         do pid="`pidof $process`"
         if [ -n "$pid" ]; then
-		printf "\n$process is already running as PID $pid\n\n"
+		RUNNING_MESSAGE="`printf "%s\n%s is already running as PID %s." "$RUNNING_MESSAGE" "$process" "$pid"`"
 		RUNNING=1
-		break
 	fi
 	done
 
 if [ "$RUNNING" -eq 1 ]; then
-	complain "`printf "%s is already running as PID %s.\n\nPlease shut down the above process(es) before running Tor Browser Bundle." "$process" "$pid"`"
+	complain "`printf "%s\n\nPlease shut down the above process(es) before running Tor Browser Bundle." "$RUNNING_MESSAGE"`"
 	exit 1
 fi
 





More information about the tor-commits mailing list