Age | Commit message (Collapse) | Author | |
---|---|---|---|
2020-02-25 | sleep(1): style(9) and other dusting | cheloha | |
- Sort includes alphabetically - Sort prototypes alphabetically - Sort stack variables by size - Add missing braces to the getopt(3) loop - Be explicit: there is *one* argument, so use argv[0], not *argv - If nanosleep(2) somehow fails, say that "nanosleep" failed when we err(3) - Remove extra parentheses from the return statement - De-(void) the obvious fprintf(3) in usage() - __progname -> getprogname(3) - POSIX 1003.2 has long since become POSIX.1 - Remove an ARGUSED linter comment - stdio(3) flushing is not the only potential issue with an exit(3) from a signal handler. Just note that exit(3) isn't safe and leave it at that. | |||
2019-07-01 | sleep(1): simplify argument parsing | cheloha | |
- No need for intermediate variables, just build the timespec directly - Use for-loops so we modify "cp" on a single line in each loop - Parse subseconds with one loop: less code, easier to read, etc. - Improve the subsecond parsing comment: make our intent really obvious ok schwarze@ | |||
2019-01-10 | Revert nanosleep(2) loop introduced in v1.25. | cheloha | |
Now that nanosleep(2) handles the full input range transparently there is no longer a 100 million second upper bound and we can remove this loop. ok phessler@ jca@ visa@ | |||
2018-02-04 | Print strtonum(3)-style error messages on invalid numeric input. | cheloha | |
More informative than the usage message. While here, no need to return EINVAL: just return 1 if we overflow. ok jca@ schwarze@ | |||
2018-02-02 | Extend range for seconds from 100 million to upper bound of time_t. | cheloha | |
Makes us compliant with POSIX.1-2008, which requires that sleep(1) support up to 2147483647 seconds. Bounced off of tb@ and jca@. ok tb@ millert@ jca@ | |||
2016-08-16 | Add, correct, and improve HISTORY sections. | Ingo Schwarze | |
From Sevan Janiyan <venture37 at geeklan dot co dot uk>. Verified using http://minnie.tuhs.org/. | |||
2015-10-11 | Don't return errno from main() | Philip Guenther | |
ok beck@ doug@ deraadt@ tedu@ | |||
2015-10-09 | Change all tame callers to namechange to pledge(2). | Theo de Raadt | |
2015-10-03 | So you'd love me to say sleep() can be tighter than tame "stdio". OK, | Theo de Raadt | |
there is that pesky usage message... We could tame "something" in the non-usage codepath.. but pop quiz, anyone know what happens after main returns or if exit(3) is called? atexit completion.. our atexit is very paranoid with structure management and uses mprotect. So current minimum a normal program needs is tame "malloc". tame "stdio" done before the usage codepath splits is just as good; tame placement before getopt provides a strong hint about program behaviour. I am still hoping someone comes up with a nice solution for atexit, or a nice tame subset between "" (pure computation) and "malloc". Ideas have been floated to expose "self", but it lacks mprotect also, and should continue to lack it (see the ssh tame sandbox). | |||
2015-09-22 | sleep doesn't benefit from setting locale. we always want to parse numbers | Ted Unangst | |
as our forefathers did, and it doesn't print any error messages in need of translation. ok stsp | |||
2014-05-27 | document SIGALRM, since it's handling is somewhat special, and use | Jason McIntyre | |
a standard EXIT STATUS blurb now that we can; ok guenther sobrado millert | |||
2014-02-21 | remove section 2/3 pointers from section 1, | Ingo Schwarze | |
and do not point programmers at the obsolete usleep(3); based on a diff from Jan Klemkow <j dot klemkow at wemelug dot de>, but removing more as suggested by jmc@ and deraadt@ | |||
2013-11-21 | add unsigned char casts for specific calls to ctype.h macros. | Theo de Raadt | |
ok guenther step | |||
2010-09-03 | add an EXIT STATUS section for /bin; | Jason McIntyre | |
2010-07-22 | move exit returns blurb out of DIAGNOSTICS; from daniel dickman | Jason McIntyre | |
2009-10-28 | rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and | Theo de Raadt | |
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms | |||
2009-02-13 | argv space does not need to be trashed during parsing | Theo de Raadt | |
2009-02-08 | bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a few | Jason McIntyre | |
updates to follow; | |||
2007-05-31 | convert to new .Dd format; | Jason McIntyre | |
2007-05-29 | - consistent STANDARDS blurb | Jason McIntyre | |
- note which options are extensions to POSIX discussed w/ deraadt otto millert | |||
2007-02-06 | fix some dodgy displays; | Jason McIntyre | |
2004-09-16 | ARGSUSED on signal handler | Theo de Raadt | |
2003-06-02 | Remove the advertising clause in the UCB license which Berkeley | Todd C. Miller | |
rescinded 22 July 1999. Proofed by myself and Theo. | |||
2002-09-06 | KNF | Theo de Raadt | |
2002-07-04 | ansi | Theo de Raadt | |
2002-05-31 | Don't include cases for characters not in optstring; ericj. Snuck in on my | Paul Janzen | |
last commit here. | |||
2002-02-16 | Part one of userland __P removal. Done with a simple regexp with some minor ↵ | Todd C. Miller | |
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically. | |||
2001-09-06 | o) __progname aria; | Mike Pechkin | |
millert@ ok. | |||
2001-05-20 | trade 3 exits for return | Michael Shalayeff | |
2000-04-12 | Trailing whitespace begone! | Aaron Campbell | |
2000-02-19 | Improve. | Aaron Campbell | |
2000-01-05 | Return EINVAL if we can't sleep for the specified time interval (i.e. it's | Paul Janzen | |
too long); problem noted by viha@vip.fi | |||
1999-12-06 | This sleep accepts fractional timings as well. | Marc Espie | |
Rephrase examples slightly. | |||
1999-09-02 | awk -> .Xr awk 1 | Aaron Campbell | |
1998-12-15 | always give .Nm macros an argument in SYNOPSIS sections; krw@tcn.net | Aaron Campbell | |
1998-11-28 | start killing redundant .Nm macro arguments (mandoc ``remembers'' the first one | Aaron Campbell | |
it's given) | |||
1998-09-23 | alphabetize SEE ALSO entries and numerically order according to section | Aaron Campbell | |
1998-09-14 | First complete sweep of man pages, bin/. Command/function names previously | Aaron Campbell | |
(incorrectly) capatilized are fixed. Comma splices, hyphenations, SYNOPSIS cleanups, other miscellaneous typos. | |||
1997-09-21 | $OpenBSD$ | Theo de Raadt | |
1997-09-12 | #include <ctype.h> | Todd C. Miller | |
1997-08-19 | Note POSIX 1003.2 conformance. | denny | |
1997-08-19 | POSIX 1003.2: exit w/ 0 code if receive SIGALRM. | denny | |
1997-06-29 | Reject non-numeric argument (so can't use atoi). | denny | |
1997-06-29 | Make sleep handle fractions of a second. Why not? | denny | |
1997-01-15 | getopt(3) returns -1 when out of args, not EOF, whee! | Todd C. Miller | |
1996-08-02 | zap getopt() case of -?, come on, it is the default! | Theo de Raadt | |
1996-06-23 | update rcsid | Theo de Raadt | |
1995-10-18 | initial import of NetBSD tree | Theo de Raadt | |