diff options
-rw-r--r-- | ext/POSIX/POSIX.xs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 519f741512..f1e1013673 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1386,9 +1386,17 @@ lseek(fd, offset, whence) OUTPUT: RETVAL -SysRet +SV * nice(incr) int incr + PPCODE: + errno = 0; + if ((incr = nice(incr)) != -1 || errno == 0) { + if (incr == 0) + XPUSHs(sv_2mortal(newSVpvn("0 but true", 10))); + else + XPUSHs(sv_2mortal(newSViv(incr))); + } void pipe() |