[interchange-cvs] interchange - jon modified 2 files

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Tue Nov 27 21:42:01 2001


User:      jon
Date:      2001-11-28 02:41:42 GMT
Modified:  scripts  interchange.PL
Modified:  dist     interchange.cfg.dist
Log:
Merge in MV_DOLLAR_ZERO change from stable branch.

Revision  Changes    Path
2.16      +14 -7     interchange/scripts/interchange.PL


rev 2.16, prev_rev 2.15
Index: interchange.PL
===================================================================
RCS file: /var/cvs/interchange/scripts/interchange.PL,v
retrieving revision 2.15
retrieving revision 2.16
diff -u -u -r2.15 -r2.16
--- interchange.PL	2001/11/15 00:53:04	2.15
+++ interchange.PL	2001/11/28 02:41:42	2.16
@@ -50,7 +50,7 @@
 #
 # Interchange version 4.9.0
 #
-# $Id: interchange.PL,v 2.15 2001/11/15 00:53:04 mheins Exp $
+# $Id: interchange.PL,v 2.16 2001/11/28 02:41:42 jon Exp $
 #
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -2900,12 +2900,19 @@
 
 		# Here we prepare enter the daemon mode.
 
-		# Set the $0 to something not having 'perl' (won't
-		# work on Solaris and IRIX among possibly others)
-		if(defined $Global::Variable->{MV_DOLLAR_ZERO}) {
-			$0 = $Global::Variable->{MV_DOLLAR_ZERO};
-			$0 = "interchange --> $Global::VendRoot"
-					if length($0) < 2;
+		# Set $0 to something pretty for ps(1).
+		# Won't work on Solaris and IRIX among possibly others.
+		# Dumps core on FreeBSD 4 stock Perl build.
+		if (defined $Global::Variable->{MV_DOLLAR_ZERO}) {
+			if ($Global::Variable->{MV_DOLLAR_ZERO}) {
+				if (length($Global::Variable->{MV_DOLLAR_ZERO}) > 1) {
+					$0 = $Global::Variable->{MV_DOLLAR_ZERO};
+				}
+				else {
+					$0 = "interchange --> $Global::VendRoot";
+				}
+			}
+			# do nothing if MV_DOLLAR_ZERO is defined but false
 		}
 		else {
 			$0 = 'interchange';



2.2       +6 -0      interchange/dist/interchange.cfg.dist


rev 2.2, prev_rev 2.1
Index: interchange.cfg.dist
===================================================================
RCS file: /var/cvs/interchange/dist/interchange.cfg.dist,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -u -r2.1 -r2.2
--- interchange.cfg.dist	2001/11/27 16:47:58	2.1
+++ interchange.cfg.dist	2001/11/28 02:41:42	2.2
@@ -102,6 +102,12 @@
 ## sendmail or clones
 Variable MV_SMTPHOST smtp
 
+# FreeBSD's stock Perl build dumps core if you set $0, so let's not touch it
+ifdef DOLLAR_ZERO_BUG or $^O =~ /freebsd/
+Message Running FreeBSD; disabling $0 set
+Variable MV_DOLLAR_ZERO 0
+endif
+
 # Include individual usertags.
 include usertag/*.tag