summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gv.c2
-rw-r--r--pp_sys.c2
-rw-r--r--t/op/coreamp.t1
3 files changed, 3 insertions, 2 deletions
diff --git a/gv.c b/gv.c
index d5b497fd42..d9030045eb 100644
--- a/gv.c
+++ b/gv.c
@@ -1358,7 +1358,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
case KEY_lstat:
case KEY_pop:
case KEY_push:
- case KEY_setpgrp: case KEY_shift: case KEY_sleep:
+ case KEY_setpgrp: case KEY_shift:
case KEY_splice:
case KEY_srand: case KEY_stat: case KEY_substr:
case KEY_sysopen:
diff --git a/pp_sys.c b/pp_sys.c
index 6737845e34..747fd7806d 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4579,7 +4579,7 @@ PP(pp_sleep)
Time_t when;
(void)time(&lasttime);
- if (MAXARG < 1)
+ if (MAXARG < 1 || (!TOPs && !POPs))
PerlProc_pause();
else {
duration = POPi;
diff --git a/t/op/coreamp.t b/t/op/coreamp.t
index 06464f1a8d..03fc14f098 100644
--- a/t/op/coreamp.t
+++ b/t/op/coreamp.t
@@ -655,6 +655,7 @@ test_proto "set$_" for qw '
test_proto "shm$_" for qw "ctl get read write";
test_proto 'shutdown';
test_proto 'sin';
+test_proto 'sleep';
test_proto "socket$_" for "", "pair";
test_proto 'sprintf';