| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Obtained from: OpenBSD
|
|
|
|
|
|
|
| |
This ensures 'return' in a trap returns the correct status to the caller.
If evalskip is not set or if it is overridden by a previous evalskip, keep
the old behaviour of restoring the exit status from before the trap.
|
|
|
|
|
|
|
|
|
| |
access, birth, change and modify times of two files, instead of only
being able to compare modify times. The builtin test in sh(1) will
automagically acquire the same expansion.
Approved by: grog
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a stack mark is set while the current stack block is empty, the stack
block may move later on (because of realloc()) and the stack mark needs to
be updated. This updating does not happen after popstackmark() has been
called; therefore, call setstackmark() again if the stack mark is still
being used.
For some reason, this only affects a few users. I cannot reproduce it. The
situation seems quite rare as well because an empty stack block would
usually be freed (by popstackmark()) before execution reaches a
setstackmark() call.
PR: 175922
Tested by: KT Sin
|
|
|
|
|
|
| |
means delete_child, not delete.
MFC after: 1 week
|
|
|
|
|
| |
Submitted by: scottl
MFC after: 1 week
|
|
|
|
|
|
| |
one should really use -a and -x instead of -m.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now it outputs fixed files, which use constants provided by the C standard
library to determine appropriate values for the target machine.
Before, mksyntax inspected the host machine which resulted in subtle
breakage if e.g. char is signed on the host and unsigned on the target such
as when cross-compiling on x86 for ARM.
Tested using -funsigned-char on amd64. Compiling build-tools without it and
sh itself with it causes various tests to fail without this change but not
with this change. With consistent -funsigned-char, tests pass with or
without this change.
The mksyntax program could be removed and syntax.c and syntax.h committed to
the repository.
Submitted by: Christoph Mallon
MFC after: 2 weeks
|
| |
|
|
|
|
| |
debugging is enabled.
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
| |
ISO/IEC 9899:1999 (E) 5.2.1p3 guarantees that the values of the characters
0123456789 are contiguous.
The generated syntax.c and syntax.h remain the same.
Submitted by: Christoph Mallon
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expand here documents at the same point other redirections are expanded but
use a non-fork subshell environment (like simple command substitutions) for
compatibility. Substitition errors result in an empty here document like
before.
As a result, a fork is avoided for short (<4K) expanded here documents.
Unexpanded here documents (with quoted end marker after <<) are not affected
by this change. They already only forked when >4K.
Side effects:
* Order of expansion is slightly different.
* Slow expansions are not executed in parallel with the redirected command.
* A non-fork subshell environment is subtly different from a forked process.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
set an exclusive advisory lock on stdout. This will be used to guarantee
orderly writing to METALOG.
Sponsored by: DARPA, AFRL
Obtained from: NetBSD (mason)
|
|
|
|
|
|
|
|
| |
the -n option is specified and the destination file exists.
PR: bin/174489
Approved by: rstone (co-mentor)
MFC after: 2 weeks
|
|
|
|
| |
Noticed by: mckusick
|
|
|
|
|
|
| |
- Add -, to SYNOPSIS section.
MFC after: 2 weeks
|
|
|
|
|
|
| |
Otherwise with '-v' we print out the file name as if it was copied:
/tmp/2gb-card/M0132.CTG not overwritten
/mnt/DCIM/CANONMSC/M0132.CTG -> /tmp/2gb-card/M0132.CTG
|
|
|
|
| |
Discussed with: jilles
|
|
|
|
|
|
| |
with what we use in /usr/share/skel/dot.profile.
Discussed with: jilles
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a loop contained certain commands (such as redirected compound commands),
the temporary memory for the redirection was not freed between iterations of
the loop but only after the loop.
Put a stackmark in evaltree(), freeing memory whenever a node has been
evaluated. Some other stackmarks are then redundant; remove them.
Example:
while :; do { :; } </dev/null; done
|
|
|
|
| |
Instead, call the only init function left directly from main().
|
| |
|
|
|
|
|
| |
- Update shadow copy of fmt_argv() prototype in w.c and fix calls for
additional parameter.
|
|
|
|
|
|
|
|
|
| |
command name of a thread from a multi-threaded process that doesn't have
an available argument list (such as kernel processes) and threads display
is enabled via -H.
Reviewed by: alfred, delphij, eric@vangyzen.net
MFC after: 1 week
|
|
|
|
|
|
|
| |
-P is an alternative to -H and -L, and it is implemented using the Hflag and Lflag variables.
Approved by: cperciva
MFC after: 3 days
|
|
|
|
|
|
| |
explicitly telling the compiler that we are on the exit route.
X-MFC: together with r245494
|
|
|
|
|
|
|
| |
static analyzer
Approved by: cperciva
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
Instead of rechecking relative paths for all hashed utilities after a cd,
track if any utility in cmdtable depends on a relative path in PATH.
If there is such a utility, cd clears the entire table.
As a result, the '*' in hash no longer happens.
|
|
|
|
|
| |
Example:
false; echo $(echo $?; :)
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
An empty simple command was added and overwrote the exit status with 0.
This affects `...` but not $(...).
Example:
v=`false;`; echo $?
|
|
|
|
| |
this case skip the test as gcc complains it is always true.
|
|
|
|
|
|
| |
PR: 174787
Submitted by: Cody Rank
MFC after: 3 days
|
|
|
|
|
|
| |
Reviewed by: gjb
Requested by: gjb
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
Accessing sys_siglist directly requires rtld to copy it from libc to the sh
executable's BSS. Also, strsignal() will put in the signal number for
unknown signals (FreeBSD-specific) so we need not do that ourselves.
Unfortunately, there is no function for sys_signame.
|
|
|
|
| |
Submitted by: Garrett Cooper
|
|
|
|
|
|
|
| |
If there is a write error on stdout, a message will be printed (to stderr)
and the exit status will be changed to 2 if it would have been 0 or 1.
PR: bin/158206
|
|
|
|
|
|
| |
define.
Reviewed by: jhb
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
|
| |
Rework block count calculations to work correctly with small "block" sizes.
MFC after: 14 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if (exists AND (NOT f_option) AND
((not_writable AND input_is_terminal) OR i_option))
prompt
in particular, add the test for input_is_terminal
PR: bin/173039
Submitted by: Mark Johnston <markjdb@gmail.com>
Approved by: cperciva
MFC after: 3 days
|
|
|
|
|
|
|
| |
using the non-monetary separator returned by localeconv(3), typically
a comma or period.
MFC after: 14 days
|
| |
|
| |
|