This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add the policy on compatibility and deprecation to perlpolicy.pod,
[perl5.git] / doio.c
diff --git a/doio.c b/doio.c
index 98861af..06f2d3d 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1721,9 +1721,10 @@ nothing in the core.
            while (++mark <= sp) {
                I32 proc;
                register unsigned long int __vmssts;
+               SvGETMAGIC(*mark);
                if (!(SvIOK(*mark) || SvNOK(*mark) || looks_like_number(*mark)))
                    Perl_croak(aTHX_ "Can't kill a non-numeric process ID");
-               proc = SvIV(*mark);
+               proc = SvIV_nomg(*mark);
                APPLY_TAINT_PROPER();
                if (!((__vmssts = sys$delprc(&proc,0)) & 1)) {
                    tot--;
@@ -1748,9 +1749,10 @@ nothing in the core.
            val = -val;
            while (++mark <= sp) {
                I32 proc;
+               SvGETMAGIC(*mark);
                if (!(SvIOK(*mark) || SvNOK(*mark) || looks_like_number(*mark)))
                    Perl_croak(aTHX_ "Can't kill a non-numeric process ID");
-               proc = SvIV(*mark);
+               proc = SvIV_nomg(*mark);
                APPLY_TAINT_PROPER();
 #ifdef HAS_KILLPG
                if (PerlProc_killpg(proc,val))  /* BSD */
@@ -1763,9 +1765,10 @@ nothing in the core.
        else {
            while (++mark <= sp) {
                I32 proc;
+               SvGETMAGIC(*mark);
                if (!(SvIOK(*mark) || SvNOK(*mark) || looks_like_number(*mark)))
                    Perl_croak(aTHX_ "Can't kill a non-numeric process ID");
-               proc = SvIV(*mark);
+               proc = SvIV_nomg(*mark);
                APPLY_TAINT_PROPER();
                if (PerlProc_kill(proc, val))
                    tot--;