Page MenuHomeFreeBSD

sleep: Overhaul.
ClosedPublic

Authored by des on Mar 22 2024, 9:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 29, 5:41 AM
Unknown Object (File)
Fri, Apr 26, 4:26 AM
Unknown Object (File)
Sun, Apr 14, 1:05 PM
Unknown Object (File)
Mon, Apr 8, 11:38 AM
Unknown Object (File)
Mon, Apr 8, 5:38 AM
Unknown Object (File)
Mar 28 2024, 2:06 AM
Unknown Object (File)
Mar 25 2024, 3:59 PM
Unknown Object (File)
Mar 24 2024, 7:30 PM
Subscribers

Details

Reviewers
se
kevans
Group Reviewers
Klara
manpages
Commits
rG2295cae7e606: sleep: Overhaul.
Summary

Program:

  • Add a dummy getopt(3) loop to handle --.
  • Move interval parsing out into a separate function.
  • Print a diagnostic for every invalid interval.
  • Check for NaN and infinity.
  • Improve bounds checks.

Manual page:

  • Miscellaneous markup fixes.
  • Reword DESCRIPTION section.
  • Move text about GNU compatibility to STANDARDS section.
  • Convert examples from csh to sh.

Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Mar 22 2024, 9:50 AM

add <unistd.h> for getopt()

bcr added a subscriber: bcr.

OK from manpages.

just remembered that we need to test for equality after casting

print tv_sec as long rather than int

smallest value representable by struct timespec

This revision is now accepted and ready to land.Mar 25 2024, 3:33 PM

remove obsolete comment, use exit instead of return

This revision now requires review to proceed.Mar 25 2024, 3:40 PM
This revision is now accepted and ready to land.Mar 25 2024, 3:41 PM
This revision was automatically updated to reflect the committed changes.