[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] OpenBSD 3.0 segmentation fault
gbm@pecosbill.com wrote:
>
> No, it didn't work, but thanks for the reply.
> Brent Mayes
>
....
>
> On Tue, 8 Jan 2002 gbm@pecosbill.com wrote:
>
> > I get a segmentation fault when starting Interchange on OpenBSD 3.0
> > with all the latest perl,apache, and interchange distributions. Tried
> > a reinstall of perl with set proctitle=define without success. Anyone
> > got Interchange working with OpenBSD?
>
> I tested Interchange 4.8.3 on OpenBSD 2.7, without problems. I haven't
> tried it on OpenBSD 3.0. As someone else mentioned, it would be worth
> forcing $0 to remain unchanged by setting 'Variable MV_DOLLAR_ZERO 0' in
> interchange.cfg (delete the ifdef/endif lines). Does that fix it?
There are two common cause to get a segmentation fault with FreeBSD!
1. UI is off in interchange
Variable UI 0 (instead of 1)
and in catalog.cfg
Require UserTag email email_raw var loc table_editor button
instead of
Require UserTag email email_raw var button
2. in bin/interchange try
-------- snip -------------
if ($Vend::mode eq 'serve') {
undef $Global::Foreground;
# Here we prepare enter the daemon mode.
# 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';
}
# We won't have much output on any of this, but if we get some
# we want it immediately
select STDERR;
$| = 1;
select STDOUT;
$| = 1;
-------- snip -------------
Question to Mike Heins:
Dear Mike Heins,
why not moving the above part of codes intos Server.pm like
---------- snip -----------
package Vend::Server;
use vars qw($VERSION);
$VERSION = substr(q$Revision: 2.0 $, 10);
use POSIX qw(setsid strftime);
use Vend::Util;
use Fcntl;
use Errno qw/:POSIX/;
use Config;
use Socket;
use Symbol;
use strict;
# test jojo
if(defined $Global::Variable->{MV_DOLLAR_ZERO}) {
#jojo
$0 = $Global::Variable->{MV_DOLLAR_ZERO};
$0 = "interchange --> $Global::VendRoot"
if length($0) < 2;
}
else {
#jojo
$0 = "interchange jojo";
}
sub new {
my ($class, $fh, $env, $entity) = @_;
---------- snip -----------
It works for me and
---------- snip -----------
# 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
---------- snip -----------
in interchange.cfg.dist is not necessary! Or is there any other reason
to let that part of codes in bin/interchange?
I can set $0 without any problem and with Perl Version 5.005_03 in my
FreeBSD, if the above part of codes is in Server.pm instead of
bin/interchange.
Thank you for your time and clarification!
Joachim
--
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[Hans-Joachim.leidinger@bpanet.de]
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de