Page MenuHomeFreeBSD

sleep: Overhaul.
ClosedPublic

Authored by des on Mar 22 2024, 9:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 5:45 PM
Unknown Object (File)
Fri, May 10, 5:43 PM
Unknown Object (File)
Fri, May 10, 5:43 PM
Unknown Object (File)
Fri, May 10, 5:41 PM
Unknown Object (File)
Fri, May 10, 5:41 PM
Unknown Object (File)
Fri, May 10, 5:41 PM
Unknown Object (File)
Fri, May 10, 5:41 PM
Unknown Object (File)
Fri, May 10, 5:41 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 56740
Build 53628: arc lint + arc unit

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.