Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sleep() with negative argument makes no sense.
Give by default a warning, do not sleep, and return zero. (the signedness problem detected by Coverity, CID 104844) Other options would include not giving a warning at all, giving a warning only if asked, and finally croaking. (Python had this problem earlier, and chose croaking.) Earlier discussion in http://www.nntp.perl.org/group/perl.perl5.porters/2015/03/msg226304.html See also: http://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html http://linux.die.net/man/3/sleep https://www.freebsd.org/cgi/man.cgi?query=sleep&sektion=3
- Loading branch information