diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-14 23:34:26 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-14 23:34:26 +0000 |
commit | ee580363108be8ac33155650c6c18d2e5cf051f3 (patch) | |
tree | 624481ea9b43b14435199892029f54adfa629ab2 /perl.c | |
parent | 7b8d334a971230040a212bc5038097b3f600a094 (diff) | |
download | perl-ee580363108be8ac33155650c6c18d2e5cf051f3.tar.gz |
[win32] merge change#904 from maintbranch
p4raw-link: @904 on //depot/maint-5.004/perl: 0af7994b889ad0dfcacb011f16f9e3c77a9292b9
p4raw-id: //depot/win32/perl@975
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -1739,6 +1739,7 @@ Internet, point your browser at http://www.perl.com/, the Perl Home Page.\n\n"); /* compliments of Tom Christiansen */ /* unexec() can be found in the Gnu emacs distribution */ +/* Known to work with -DUNEXEC and using unexelf.c from GNU emacs-20.2 */ void my_unexec(void) @@ -1746,18 +1747,16 @@ my_unexec(void) #ifdef UNEXEC SV* prog; SV* file; - int status; + int status = 1; extern int etext; - prog = newSVpv(BIN_EXP); + prog = newSVpv(BIN_EXP, 0); sv_catpv(prog, "/perl"); - file = newSVpv(origfilename); + file = newSVpv(origfilename, 0); sv_catpv(file, ".perldump"); - status = unexec(SvPVX(file), SvPVX(prog), &etext, sbrk(0), 0); - if (status) - PerlIO_printf(PerlIO_stderr(), "unexec of %s into %s failed!\n", - SvPVX(prog), SvPVX(file)); + unexec(SvPVX(file), SvPVX(prog), &etext, sbrk(0), 0); + /* unexec prints msg to stderr in case of failure */ PerlProc_exit(status); #else # ifdef VMS |