You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2006/12/28 17:44:59 UTC
svn commit: r490760 - /spamassassin/trunk/spamd/spamd.raw
Author: jm
Date: Thu Dec 28 08:44:58 2006
New Revision: 490760
URL: http://svn.apache.org/viewvc?view=rev&rev=490760
Log:
bug 5255: SIGHUP handler couldn't restart spamd if it had been started using an odd commandline (possibly only on solaris)
Modified:
spamassassin/trunk/spamd/spamd.raw
Modified: spamassassin/trunk/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamd/spamd.raw?view=diff&rev=490760&r1=490759&r2=490760
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw (original)
+++ spamassassin/trunk/spamd/spamd.raw Thu Dec 28 08:44:58 2006
@@ -945,12 +945,16 @@
Mail::SpamAssassin::Logger::close_log();
chdir($ORIG_CWD)
|| die "spamd: restart failed: chdir failed: ${ORIG_CWD}: $!\n";
- exec( $ORIG_ARG0, @ORIG_ARGV );
+
+ # ensure we re-run spamd using the right perl interpreter, and
+ # with the right switches (taint mode and warnings) (bug 5255)
+ my $perl = Mail::SpamAssassin::Util::untaint_var($^X);
+ my @execs = ( $perl, "-T", "-w", $ORIG_ARG0, @ORIG_ARGV );
+ warn "spamd: restarting using '" . join (' ', @execs) . "'\n";
+ exec @execs;
# should not get past that...
- die "spamd: restart failed: exec failed: "
- . join ( ' ', $ORIG_ARG0, @ORIG_ARGV )
- . ": $!\n";
+ die "spamd: restart failed: exec failed: " . join (' ', @execs) . ": $!\n";
}
for (my $i = keys %children; $i < $childlimit; $i++) {