summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@pobox.com>2003-07-10 09:13:20 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2003-07-10 17:33:53 +0000
commitb35112e751727d4207068fd54bf0c9d77ad0ba97 (patch)
treea7c3178c72e3442ae7dd539f8e3b913dbd62c938 /perl.c
parent669f94828c50674b20ed995418707226081e2671 (diff)
downloadperl-b35112e751727d4207068fd54bf0c9d77ad0ba97.tar.gz
Restore SIGFPE on exec()
Message-ID: <20030710171319.GA21588@perlsupport.com> p4raw-id: //depot/perl@20117
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/perl.c b/perl.c
index d41e8db92e..73f10df75c 100644
--- a/perl.c
+++ b/perl.c
@@ -2982,10 +2982,12 @@ S_open_script(pTHX_ char *scriptname, bool dosearch, SV *sv, int *fdscript)
PL_statbuf.st_mode & (S_ISUID|S_ISGID))
{
/* try again */
+ PERL_FPU_PRE_EXEC
PerlProc_execv(Perl_form(aTHX_ "%s/sperl"PERL_FS_VER_FMT,
BIN_EXP, (int)PERL_REVISION,
(int)PERL_VERSION,
(int)PERL_SUBVERSION), PL_origargv);
+ PERL_FPU_POST_EXEC
Perl_croak(aTHX_ "Can't do setuid\n");
}
# endif
@@ -3242,9 +3244,11 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n");
(void)PerlIO_close(PL_rsfp);
#ifndef IAMSUID
/* try again */
+ PERL_FPU_PRE_EXEC
PerlProc_execv(Perl_form(aTHX_ "%s/sperl"PERL_FS_VER_FMT, BIN_EXP,
(int)PERL_REVISION, (int)PERL_VERSION,
(int)PERL_SUBVERSION), PL_origargv);
+ PERL_FPU_POST_EXEC
#endif
Perl_croak(aTHX_ "Can't do setuid\n");
}
@@ -3326,9 +3330,11 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n");
#if defined(HAS_FCNTL) && defined(F_SETFD)
fcntl(PerlIO_fileno(PL_rsfp),F_SETFD,0); /* ensure no close-on-exec */
#endif
+ PERL_FPU_PRE_EXEC
PerlProc_execv(Perl_form(aTHX_ "%s/perl"PERL_FS_VER_FMT, BIN_EXP,
(int)PERL_REVISION, (int)PERL_VERSION,
(int)PERL_SUBVERSION), PL_origargv);/* try again */
+ PERL_FPU_POST_EXEC
Perl_croak(aTHX_ "Can't do setuid\n");
#endif /* IAMSUID */
#else /* !DOSUID */