| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
If an alias's value ends with a space or tab, the next word is also
checked for aliases.
This is a POSIX feature. It is useful with utilities like command and
nohup (alias them to themselves followed by a space).
|
|
|
|
|
|
| |
linked list.
Obtained from: OpenBSD
|
|
|
|
|
| |
Since the first alias's value does not end with a blank, the next word
should not be checked for aliases.
|
| |
|
|
|
|
|
|
|
|
|
| |
Add the space to avoid alias recursion when the alias is expanded, not when
it is added.
As a result, displaying an alias via command -v, command -V or type no
longer erroneously appends a space. Adjust the tests so they now require
this bug to be absent.
|
| |
|
|
|
|
|
|
| |
PR: bin/183681 docs/183681
Submitted by: Robin Hahling <robin.hahling@gw-computing.net>
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SIGWINCH handler triggers breakage in libedit which is hard to fix; see
PR bin/169773.
Also, window size changes while a program is in foreground (and it rather
than sh will receive SIGWINCH) will now be picked up automatically.
Downside: it is now certain that a resize is only processed after pressing
<Enter>. If libedit is fixed, sh will most likely have to be changed also.
PR: bin/180146
|
|
|
|
|
|
|
|
| |
Redo r260506 by using the new TEST_METADATA functionality of bsd.test.mk
to mark the sh(1) and test(1) tests as not supporting root. This is to
get rid of hand-crafted Kyuafiles for these very simple cases.
MFC after: 5 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redo r260586 by using the new functionality in tap.test.mk to transparently
support perl-based test programs.
As a side-effect, we get rid of an explicit path to /usr/bin/perl by
replacing it with /usr/local/bin/perl (or as defined in tap.test.mk).
This also fixes the name of the legacy_test source file because this should
have always been legacy_test.pl and not legacy_test.sh. My mistake when
originally moving the code around without realizing that this was a perl
script.
MFC after: 5 days
|
|
|
|
|
|
|
| |
The effect of this is that the test program is marked as skipped when perl
is missing, instead of marking it as broken due to an execution failure.
MFC after: 3 days
|
|
|
|
|
| |
Coverity: CID 1007204
Sponsored by: Netflix, Inc.
|
|
|
|
|
|
|
|
|
|
|
| |
One of the tests for test(1) fails and some of the tests for sh(1) are
silently bypassed when running as root.
To fix these tests and ensure they all run, mark the test programs for
sh(1) and test(1) as requiring an unprivileged user. (This should and
will be the default in Kyua but isn't yet.)
MFC after: 1 week
|
|
|
|
|
| |
Also, do not say that ! before a pipeline is an operator, because it is
syntactically a keyword.
|
|
|
|
|
|
| |
parent is suspended, not the process itself.
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
| |
preadbuffer() maintained a flag whether there was any non-whitespace
character. This flag is only useful when history is enabled (in that case,
lines containing only whitespace are not added to history). Instead, check
using strspn() when history is enabled.
There is an approximate 2% speedup when running
sh -c '. /etc/rc.subr; . /etc/defaults/rc.conf; source_rc_confs'
with hot cache.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
PR: docs/135516
Submitted by: arundel (based on)
Approved by: gjb (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is a proof of concept on how to easily integrate existing
tests from the tools/regression/ hierarchy into the /usr/tests/ test
suite and on how to adapt them to the new layout for src.
To achieve these goals, this change:
- Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/.
- Renames the previous regress.sh files to legacy_test.sh.
- Adds Makefiles to build and install the tests and all their supporting
data files into /usr/tests/bin/.
- Plugs the legacy_test test programs into the test suite using the new
TAP backend for Kyua (appearing in 0.8) so that the code of the test
programs does not have to change.
- Registers the new directories in the BSD.test.dist mtree file.
Reviewed by: freebsd-testing
Approved by: rpaulo (mentor)
|
| |
|
| |
|
|
|
|
| |
The global variable t_wp_op is no longer needed.
|
| |
|
|
|
|
|
|
| |
Although <&0 does nothing, it is a redirection affecting standard input and
should therefore disable the </dev/null redirection implicit in a background
command.
|
|
|
|
|
| |
An alias should be printed by command -v as a command line; therefore, make
the alias definition suitable for re-input to the shell.
|
|
|
|
|
|
|
| |
Ask for a specific process instead of pulling down all processes when
-F <pidfile> is specified. This is much much faster.
Obtained from: DragonflyBSD
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If job control is not enabled, background jobs started with ... & ignore
SIGINT and SIGQUIT so that they are not affected by such signals that are
intended for the foreground job. However, this should not prevent
reassigning a different action for these signals (as if the shell invocation
inherited these signal actions from its parent).
Austin group issue #751
Example:
{ trap - INT; exec sleep 10; } & wait
A Ctrl+C should terminate the sleep command.
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
user. Kqueue now saves the ucred of the allocating thread, to
correctly decrement the counter on close.
Under some specific and not real-world use scenario for kqueue, it is
possible for the kqueues to consume memory proportional to the square
of the number of the filedescriptors available to the process. Limit
allows administrator to prevent the abuse.
This is kernel-mode side of the change, with the user-mode enabling
commit following.
Reported and tested by: pho
Discussed with: jmg
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
|
|
|
|
| |
MFC after: 1 month
|
|
|
|
|
|
| |
The getpgrp() call is unnecessary: if there is no job control then the
result was not used at all and if there is job control then we are not a
subshell and our process group ID is equal to our process ID (rootpid).
|
|
|
|
|
|
| |
Noticed by: Nikolai Lifanov <lifanov@mail.lifanov.com>
Approved by: re (gjb)
|
|
|
|
| |
Approved by: re (gjb)
|
|
|
|
|
|
|
| |
CID: 1006559
Approved by: re (kib)
MFC after: 2 weeks
Sponsored by: FreeBSD Foundation
|
|
|
|
|
|
| |
Approved by: re (blackend)
MFC after: 1 week
X-MFC note: stable/9 only
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Formerly, return always returned from a function if it was called from a
function, even if there was a closer dot script. This was for compatibility
with the Bourne shell which only allowed returning from functions.
Other modern shells and POSIX return from the function or the dot script,
whichever is closest.
Git 1.8.4's rebase --continue depends on the POSIX behaviour.
Reported by: Christoph Mallon, avg
|
|
|
|
|
|
|
|
|
|
| |
The change in r238888 was incomplete. It was still possible for a trapped
signal to arrive before the shell went to sleep (sigsuspend()) because a
check was missing or because the signal arrived before in_waitcmd was set.
On SMP, this bug sometimes caused the builtins/wait4.0 test to take 1 second
to execute; it then might or might not fail. On UP, the test almost always
failed.
|
|
|
|
|
|
| |
The erflag argument was only used by old-style (``) command substitutions.
We can remove it and handle the special case in the command substitution
code.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This implementation makes minimal changes: command names starting with "-"
(other than "--") can still be queried normally.
|
|
|
|
|
|
|
|
|
|
| |
NEOF needs to be a non-null pointer distinct from valid union node pointers.
It is not dereferenced.
The new NEOF is much like SIG_ERR except that it is an object pointer
instead of a function pointer.
The variable tokpushback can now be static.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ps(1) utility, e.g. "ps -O fib".
bin/ps/keyword.c:
Add the "fib" keyword and default its column name to "FIB".
bin/ps/ps.1:
Add "fib" as a supported keyword.
sys/compat/freebsd32/freebsd32.h:
sys/kern/kern_proc.c:
sys/sys/user.h:
Add the default fib number for a process (p->p_fibnum)
to the user land accessible process data of struct kinfo_proc.
Submitted by: Oliver Fromme <olli@fromme.com>, gibbs
|
|
|
|
|
| |
Aliases starting with "-" (which are non-POSIX) will need to be preceded by
an alias not starting with "-" or the newly added "--".
|
|
|
|
|
|
|
|
|
|
| |
As per POSIX, a simple command must have at least one redirection,
assignment word or command word.
These occured in rare cases such as eval "f()" .
The extension of allowing no commands inside { }, if, while, for, etc.
remains.
|