summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-11-10 18:22:43 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-11-10 18:22:43 -0800
commitbae8cfc6926f9b04d8adac6a9ee6d563cc18263f (patch)
tree6ca3581583a8e5eabf6318c844ba2f3bfba9cb9a /pp_sys.c
parentf9e95907d516e72aa3d1664d0723718e812957e6 (diff)
downloadperl-bae8cfc6926f9b04d8adac6a9ee6d563cc18263f.tar.gz
Don’t treat setpgrp($nonzero) as setpgrp(1)
This was broken inadvertently by 92f2ac5f (5.15.3). I really have no idea how to test this. I only confirmed the bug and its fix via a temporary warn statement in pp_setpgrp (obviously not included in this commit).
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 16c2d60ba0..e37cfa8838 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4449,7 +4449,7 @@ PP(pp_setpgrp)
Pid_t pgrp;
Pid_t pid;
pgrp = MAXARG == 2 && (TOPs||POPs) ? POPi : 0;
- if (MAXARG > 0) pid = TOPs && TOPi;
+ if (MAXARG > 0) pid = TOPs ? TOPi : 0;
else {
pid = 0;
XPUSHi(-1);