summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/B/t/concise-xs.t2
-rw-r--r--ext/POSIX/POSIX.xs8
-rw-r--r--ext/POSIX/lib/POSIX.pm3
3 files changed, 10 insertions, 3 deletions
diff --git a/ext/B/t/concise-xs.t b/ext/B/t/concise-xs.t
index 9082f61eed..efd0cf7788 100644
--- a/ext/B/t/concise-xs.t
+++ b/ext/B/t/concise-xs.t
@@ -205,7 +205,7 @@ my $testpkgs = {
fmod floor dup2 dup difftime cuserid ctime
ctermid cosh constant close clock ceil
bootstrap atan asin asctime acos access abort
- _exit
+ _exit sleep
/],
},
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 1bad5e10d9..ab30a1c496 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1885,6 +1885,14 @@ pause()
CLEANUP:
PERL_ASYNC_CHECK();
+unsigned int
+sleep(seconds)
+ unsigned int seconds
+ CODE:
+ RETVAL = PerlProc_sleep(seconds);
+ OUTPUT:
+ RETVAL
+
SysRet
setgid(gid)
Gid_t gid
diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm
index 9840b766f3..b6997ffca9 100644
--- a/ext/POSIX/lib/POSIX.pm
+++ b/ext/POSIX/lib/POSIX.pm
@@ -179,7 +179,6 @@ my %reimpl = (
isatty => 'filehandle => -t $_[0]',
link => 'oldfilename, newfilename => CORE::link($_[0], $_[1])',
rmdir => 'directoryname => CORE::rmdir($_[0])',
- sleep => 'seconds => $_[0] - CORE::sleep($_[0])',
unlink => 'filename => CORE::unlink($_[0])',
utime => 'filename, atime, mtime => CORE::utime($_[1], $_[2], $_[0])',
);
@@ -391,7 +390,7 @@ our %EXPORT_TAGS = (
# @EXPORT are actually shared hash key scalars, which will save some memory.
our @EXPORT = keys %export;
- our @EXPORT_OK = (qw(close lchown nice open pipe read times write
+ our @EXPORT_OK = (qw(close lchown nice open pipe read sleep times write
printf sprintf),
grep {!exists $export{$_}} keys %reimpl, keys %replacement);
}