Age | Commit message (Collapse) | Author |
|
p_tv() is identical to p_ts(). Better to not have two copies: in
p_tv(), convert the timeval to a timespec and pass it to p_ts().
With input from tb@ and millert@.
Thread: https://marc.info/?l=openbsd-tech&m=169448818503541&w=2
ok tb@ millert@
|
|
-DSMALL has never been used to build the ramdisks, thus the support for
reading pax format archives has always been there. This is misleading,
so just zap the ifdef since we want to keep read support.
Went through a make release Just In Case(tm).
Spotted by caspar@, ok millert@ sthen@ caspar@
|
|
the st_*time and (obsolete) st_*timensec members separately.
ok millert@
|
|
|
|
the POSIX-standard st_*tim.tv_nsec members.
ok millert@
|
|
comments sthen@ and Peter J. Philipp <pjp AT delphinusdns DOT org>
ok jmc@
|
|
ksh(1) MAIL, MAILCHECK, MAILPATH mbox handling is useless in the installer.
OK miod deraadt
|
|
Previously, when creating an archive file with pax(1), pax will attempt
to open a file even if the file will be skipped due to an -s replacement
with the empty string. With this change, pax will not attempt to open
files that it knows will be skipped.
When doing direct copies to a directory (-rw), pax already skips
the file before attempting to open it. So this makes the behavior
more consistent.
This can measurably speed up pax when skipping a large number of files.
OK tb@
|
|
|
|
initializers as they are not required to be compile-time constants.
So, intialize these global variables at the top of main().
ok miod@ deraadt@ yasuoka@ millert@
|
|
If the mtime in the file header is larger than MAX_TIME_T, trucate
it to MAX_TIME_T, not INT_MAX. OK otto@
|
|
Reported by David Leadbeater. OK op@
|
|
|
|
If there are multiple matches when using autocomplete, the list of
matching file names was output as-is. However, for a single match,
control characters are escaped before the file name is displayed.
This makes the behavior more consistent by escaping control chars
in the list of matches too. Discussed with deraadt@, OK op@
|
|
Drop the vestiges of the pre-POSIX support of `test -t' defaulting to fd
1. It doesn't work and it always succeed since "-t" is treated as a
string by default when no argument (fd) is specified.
diff by Lucas (lucas [at] sexy [dot] is) with minor change by me.
ok millert@
|
|
-t always requires the fd number as argument, there's no default. With
only one argument -t is equivalent to `test -n -t' and so banally always
true.
diff from Lucas (lucas [at] sexy [dot] is)
ok millert@
|
|
This is more consistent with how bash, zsh and ksh93 behave and
makes $(< filename) more of a drop-in replacment for $(cat filename).
OK kn@ florian@
|
|
confirmed/ok kn
|
|
|
|
The Op on its own line becomes part of the item body instead of the list
item itself.
OK millert@
|
|
length value, not the length difference.
ok deraadt@ millert@ guenther@
|
|
ok miod@ millert@
|
|
No need for KSH_VERSION and its PS1 esacape sequences in installer shells.
Save some bits and clean up what(1) output on ramdisk kernels.
OK deraadt
|
|
|
|
exposed in a new field returned by sysctl(KERN_PROC). Update
pthread_{get,set}_name_np(3) to use the syscalls. Show them, when
set, in ps -H and top -H output.
libc and libpthread minor bumps
ok mpi@, mvs@, deraadt@
|
|
From nabijaczleweli, OK deraadt@
|
|
With input from and OK jmc@
|
|
space (specifically in the "alias", "readonly" and "typeset"
commands);
from josiah frentsos
|
|
A few programs used the plural in their synopsis which doesn't read as
clear as the obvious triple-dot notation.
mdoc(7) .Ar defaults to "file ..." if no arguments are given and consistent
use of 'arg ...' matches that behaviour.
Cleanup a few markups of the same argument so the text keeps reading
naturally; omit unhelpful parts like 'if optional arguments are given,
they are passed along' for tools like time(1) and timeout(1) that obviously
execute commands with whatever arguments where given -- just like doas(1)
which doesn't mention arguments in its DESCRIPTION in the first place.
For expr(1) the difference between 'expressions' and 'expression ...' is
crucial, as arguments must be passed as individual words.
Feedback millert jmc schwarze deraadt
OK jmc
|
|
Reported with diff from Ross L Richardson
Agreed kn, OK jmc
|
|
getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument. We can
handle this case with the "default" failure case with no loss of
legibility. Hence, remove all the redundant "case '?':" lines.
Prompted by dlg@. With help from dlg@ and millert@.
Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2
ok naddy@ millert@ dlg@
|
|
This matches both historical behavior and the POSIX specification.
From Soeren Tempel.
|
|
|
|
ok miod@
|
|
|
|
The following three cases behave identical in bash(1), but our ksh
(ksh93 also) fails to run the trap in the last case:
(non-zero exit code is trigger, no redirection)
$ ksh -c 'trap "echo ERR" ERR ; false'
ERR
(failed redirection is trigger, 'echo' was not executed)
$ ksh -c 'trap "echo ERR" ERR ; echo >/'
ksh: cannot create /: Is a directory
ERR
(failed redirection, no execution, trap was NOT triggered)
$ ksh -c 'trap "echo ERR" ERR ; exec >/'
ksh: cannot create /: Is a directory
bash(1) prints "ERR" in all three cases, as expected.
ksh93 behaves like our ksh(1).
In ksh `exec' is a builtin (CSHELL), but also special (SPEC_BI):
$ type alias
alias is a shell builtin
$ type exec
exec is a special shell builtin
Without command and redirection alone, `exec' permanently redirects I/O for
the shell itself, not executing anything; it is the only (special) builtin
with such a special use-case, implemented as c_sh.c:c_exec().
This corner-case is overlooked in exec.c:execute() which handles iosetup()
failure for all commands, incl. builtins.
Exclude c_exec() from the rest of special builtins to ensure it runs the
ERR trap as expected:
$ ./obj/ksh -c 'trap "echo ERR" ERR ; exec >/'
ksh: cannot create /: Is a directory
ERR
Also add three new regress cases covering this; rest keep passing.
OK millert
|
|
and can depend on the /usr/share/zoneinfo bypass.
OK mestre, millert, deraadt
|
|
Reported by Christian Weisgerber
OK kn@
|
|
this using unveil(2), but ignore errors if /var/log doesn't exist. We
want to be able to set the time if the system is damanged or /var is
not mounted yet.
We also need to unveil everything for reading since we still allow
arbitrary locations of zone info files. Hopefully that will go away
soon.
OK deraadt
|
|
OK millert
|
|
- while here, wrap a long line
|
|
In -f mode group & display parent/child process relationships using ASCII art.
Borrows heavily from Brian Somers' work on FreeBSD ps(1).
With input from deraadt@ and tb@
OK benno@ claudio@
|
|
nudge from luka krmpotic
|
|
"rm -rfv nonexistent". problem spotted by Alfred Morgan
ok millert
|
|
ok schwarze@
|
|
ok cheloha@
|
|
Description
- "for a minimum of" is better said "for at least".
- The seconds argument can be zero, so say "non-negative".
- Specify that the number (the whole thing) is decimal to exclude
e.g. hex numbers. It then follows that the optional fraction
must also be decimal.
- No need to inspire the reader to use sleep(1) in any particular way.
It is probably sufficient to demonstrate these patterns in the Examples
section later.
Asynchronous Events
- Note that SIGALRM wakes sleep(1) up "early".
Examples
- Simplify the first example. Parenthetically pointing the reader to
at(1) muddies what is otherwise a trivial example. We can still point
the reader to at(1) in the See Also section later.
- Shorten the interval in the first example. A half hour is not
interactive.
- Get rid of the entire csh(1) example. It's extremely complex and
the bulk of the text is spent explaining things that aren't about
sleep(1) at all.
- Tweak the third example to show the reader that you can sleep
for a fraction of a second, as mentioned in the Description.
Standards
- Prefer active voice.
"The handling of fractional arguments" is better said
"Support for fractional seconds".
Shorten "is provided as" to "is".
History
- Not merely "appeared": "first appeared".
- Note that sleep(1) was reimplemented for 4.4BSD.
Thread: https://marc.info/?l=openbsd-tech&m=165888826603953&w=2
Lots of nice tweaks from jmc@. Typo spotted by Crystal Kolipe.
ok jmc@
|
|
Also remove unneeded seltrue() and selfalse().
OK mpi@ jsg@
|
|
|
|
jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.
ok jmc@
|