Commit Graph

72 Commits

Author SHA1 Message Date
Warner Losh
b2c76c41be Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:15 -06:00
Warner Losh
d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Alfonso Gregory
cccdaf507e Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
2023-07-07 10:45:18 -06:00
Simon J. Gerraty
d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Fernando Apesteguía
50f54daf41 time(1): Add EXAMPLES section
Add EXAMPLES showing all five flags: -a, -h, -l, -o, -p

Approved by:	manpages (bcr)
2020-07-07 16:07:39 +00:00
Alan Somers
8a9ab04279 time(1): use the monotonic clock
The monotonic clock is more appropriate than the realtime clock for
measuring durations.

Reviewed by:	ken, jilles
Differential Revision:	https://reviews.freebsd.org/D14032
2018-05-04 14:39:32 +00:00
Alan Somers
cb938d95e2 time(1): use clock_gettime(2) instead of gettimeofday(2)
This is a prerequisite to adding support for the monotonic clock

Reviewed by:	ken, imp
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D14030
2018-01-24 17:12:34 +00:00
Pedro F. Giffuni
8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
John-Mark Gurney
e48a49b333 Don't do things we aren't allowed to do in a signal handler... Defer
the work to the main thread...  This fixes a possible crash if SIGINFO
is delivered at the wrong time...

This still leaves getrusage broken for some reason, but I believe that
is a kernel issue and cannot be fixed here...
2015-05-18 19:18:42 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Jilles Tjoelker
689f0bd93b time: Use close-on-exec instead of fclose() in the child process. 2012-12-08 17:41:39 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Ed Schouten
902d9eafbf Rework all non-contributed files that use `struct timezone'.
This structure is not part of POSIX. According to POSIX, gettimeofday()
has the following prototype:

	int gettimeofday(struct timeval *restrict tp, void *restrict tzp);

Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is
not used). Remove dead error handling code. Also use NULL for a
nul-pointer instead of integer 0.

While there, change all pieces of code that only use tv_sec to use
time(3), as this provides less overhead.
2012-09-01 14:45:15 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Joel Dahl
da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
Ed Schouten
b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Xin LI
821df508e8 Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
Xin LI
6f2d322192 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
David Malone
61d8eede29 Cast to intmax_t to print tv_sec in struct timeval.
Avoid shadowing a global variable with a function argument.
Set WARNS to 6.
2007-05-07 12:23:23 +00:00
Ruslan Ermilov
cb29445a92 Markup fixes. 2006-09-29 15:20:48 +00:00
Pawel Jakub Dawidek
b6d7073d13 Handle SIGINFO in time(1) by printing the time the given command is running.
I find it quite handy to just hit ^T and see the time.
2006-05-14 13:16:19 +00:00
Maxim Konovalov
beb66b02a4 o Close an output file -o flag opened before execvp(3) in a child.
PR:		bin/89666
Submitted by:	Arne H Juul
MFC after:	1 month
2006-04-16 17:44:49 +00:00
Ruslan Ermilov
f682f10c76 Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Ruslan Ermilov
6a3e8b0adc Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
Sean Chittenden
77879b47b7 Uses wait4() instead of wait3() when waiting for a child process to exit.
Reviewed by:	yar
2003-10-17 07:53:30 +00:00
Yaroslav Tykhiy
69df5b5a0b Assorted minor fixes, mostly style(9):
- PID should be pid_t, not int;
- sort #include's and local variables;
- don't overuse initializers;
- use warn(3) instead of perror(3) consistently;
- amplify the comment on signals.
2003-10-04 15:17:08 +00:00
Yaroslav Tykhiy
1530954057 Don't dump core from the time(1) process itself
if the child process has exited on a signal
whose default action is to dump core.
2003-10-04 14:42:03 +00:00
Philippe Charnier
49b3830c8e Introduce options definition the standard way. command -> utility. 2003-06-09 19:37:45 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
David Malone
f4ac32def2 ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by:	md5
2002-09-04 23:29:10 +00:00
Tim J. Robbins
8b4f995acc Document the fairly obvious effects of the PATH environment variable. 2002-06-28 09:31:03 +00:00
Tim J. Robbins
51ddbf586b time(1) does not use the shell to execute the specified utility, remove
sentence stating it did.
2002-06-20 07:12:34 +00:00
Tim J. Robbins
3f6c6c912f Make it obvious that command line arguments may be specified for the utility
that is to be invoked on the command line. Use "utility" instead of "command"
in manual page and usage message for consistency with POSIX.
2002-06-20 07:07:00 +00:00
Tim J. Robbins
780c7a8790 Correct History: time(1) appeared at least as early as V3. 2002-06-03 14:54:04 +00:00
Tim J. Robbins
d6c762af40 Determine exit status to use before writing diagnostic message; warn()
may change errno.
2002-05-25 03:32:23 +00:00
Warner Losh
3f330d7d1a remove __P 2002-03-22 01:42:45 +00:00
David Malone
0050672a16 Fix one warning - still not warns clean. 2001-12-03 21:32:01 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
625003720a mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
Andrey A. Chernov
e1fc0c16f0 Localize it (LC_NUMERIC) 2001-02-10 22:46:47 +00:00