[interchange-cvs] interchange - jon modified 2 files
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Mon Nov 26 17:34:01 2001
User: jon
Date: 2001-11-26 22:33:01 GMT
Modified: dist Tag: STABLE_4_8-branch interchange.cfg.dist
Modified: scripts Tag: STABLE_4_8-branch interchange.PL
Log:
Work around FreeBSD stock Perl bug that causes a core dump if you assign
to $0. We check if we're on FreeBSD in interchange.cfg and disable the
assignment.
MV_DOLLAR_ZERO options:
undef 'interchange'
0 (do nothing)
1 'interchange --> CATROOT'
string 'string'
This should be backward-compatible.
Revision Changes Path
No revision
No revision
2.0.2.1 +6 -0 interchange/dist/interchange.cfg.dist
rev 2.0.2.1, prev_rev 2.0
Index: interchange.cfg.dist
===================================================================
RCS file: /var/cvs/interchange/dist/interchange.cfg.dist,v
retrieving revision 2.0
retrieving revision 2.0.2.1
diff -u -u -r2.0 -r2.0.2.1
--- interchange.cfg.dist 2001/07/18 02:20:40 2.0
+++ interchange.cfg.dist 2001/11/26 22:33:00 2.0.2.1
@@ -107,6 +107,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
No revision
No revision
2.7.2.5 +14 -7 interchange/scripts/interchange.PL
rev 2.7.2.5, prev_rev 2.7.2.4
Index: interchange.PL
===================================================================
RCS file: /var/cvs/interchange/scripts/interchange.PL,v
retrieving revision 2.7.2.4
retrieving revision 2.7.2.5
diff -u -u -r2.7.2.4 -r2.7.2.5
--- interchange.PL 2001/10/18 16:24:36 2.7.2.4
+++ interchange.PL 2001/11/26 22:33:00 2.7.2.5
@@ -50,7 +50,7 @@
#
# Interchange version 4.8.3
#
-# $Id: interchange.PL,v 2.7.2.4 2001/10/18 16:24:36 mheins Exp $
+# $Id: interchange.PL,v 2.7.2.5 2001/11/26 22:33:00 jon Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -2882,12 +2882,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';