History log of /freebsd/bin/sh/jobs.c (Results 101 – 125 of 293)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1794251a 29-Jul-2012 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Fix EINTR race condition in "wait" and "set -T" using sigsuspend().

When waiting for child processes using "wait" or if "set -T" is in effect, a
signal interrupts the wait. Make sure there is no

sh: Fix EINTR race condition in "wait" and "set -T" using sigsuspend().

When waiting for child processes using "wait" or if "set -T" is in effect, a
signal interrupts the wait. Make sure there is no window where the signal
handler may be invoked (setting a flag) just before going to sleep.

There is a similar race condition in the shell language, but scripts can
avoid it by exiting from the trap handler or enforcing synchronization using
a fifo.

If SIGCHLD is not trapped, a signal handler must be installed for it. Only
install this handler for the duration of the wait to avoid triggering
unexpected [EINTR] errors elsewhere.

Note that for some reason only SIGINT and SIGQUIT interrupt a "wait"
command. This remains the case.

show more ...


# fb05913c 28-Jul-2012 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Do not ask for stopped/continued processes if we do not need them
rather than retrying wait3 if they happen.


# 61fb716a 28-Jul-2012 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Inline waitproc() into its only caller.


# faa787d3 28-Jul-2012 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Track continued jobs (even if not continued by bg or fg).

This uses wait3's WCONTINUED flag.

There is no message for this. The change is visible in "jobs" or if the job
stops again.


# 184dcee2 15-Jul-2012 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Remove unused variable in_dowait.


# 6a068746 15-May-2012 Alexander Motin <mav@FreeBSD.org>

MFC


# 38f1b189 26-Apr-2012 Peter Grehan <grehan@FreeBSD.org>

IFC @ r234692

sys/amd64/include/cpufunc.h
sys/amd64/include/fpu.h
sys/amd64/amd64/fpu.c
sys/amd64/vmm/vmm.c

- Add API to allow vmm FPU state init/save/restore.

FP stuff discussed with: kib


Revision tags: release/8.3.0_cvs, release/8.3.0
# 8833b15f 03-Apr-2012 Gleb Smirnoff <glebius@FreeBSD.org>

Merge head r232686 through r233825 into projects/pf/head.


# b95fca47 02-Apr-2012 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Fix build with -DDEBUG=2.

Reported by: Kristof Provost
MFC after: 1 week


# 9dba179d 17-Feb-2012 Bjoern A. Zeeb <bz@FreeBSD.org>

IFC @231845

Sponsored by: Cisco Systems, Inc.


# caf29fab 05-Feb-2012 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Use vfork in a few common cases.

This uses vfork() for simple commands and command substitutions containing a
single simple command, invoking an external program under certain conditions
(no red

sh: Use vfork in a few common cases.

This uses vfork() for simple commands and command substitutions containing a
single simple command, invoking an external program under certain conditions
(no redirections or variable assignments, non-interactive shell, no job
control). These restrictions limit the amount of code executed in a vforked
child.

There is a large speedup (for example 35%) in microbenchmarks. The
difference in buildkernel is smaller (for example 0.5%) but still
statistically significant. See
http://lists.freebsd.org/pipermail/freebsd-hackers/2012-January/037581.html
for some numbers.

The use of vfork() can be disabled by setting a variable named
SH_DISABLE_VFORK.

show more ...


# 2fae4c3d 25-Jan-2012 Philippe Charnier <charnier@FreeBSD.org>

Add prototypes, ANSIfy functions definitions to reduce WARNS=6 output.


Revision tags: release/9.0.0
# 935205e2 17-Jul-2011 Justin T. Gibbs <gibbs@FreeBSD.org>

Integrate from Head into ZFSD feature branch as of revision r224141.


# a5615c90 28-Jun-2011 Peter Grehan <grehan@FreeBSD.org>

IFC @ r222830


# 49f5aeaf 15-Jun-2011 Attilio Rao <attilio@FreeBSD.org>

MFC


# 454a02b3 13-Jun-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Fix duplicate prototypes for builtins.

Have mkbuiltins write the prototypes for the *cmd functions to builtins.h
instead of builtins.c and include builtins.h in more .c files instead of
duplicat

sh: Fix duplicate prototypes for builtins.

Have mkbuiltins write the prototypes for the *cmd functions to builtins.h
instead of builtins.c and include builtins.h in more .c files instead of
duplicating prototypes for *cmd functions in other headers.

show more ...


# b8764e51 13-Jun-2011 Attilio Rao <attilio@FreeBSD.org>

MFC


# c543e1ae 13-Jun-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Save/restore changed variables in optimized command substitution.

In optimized command substitution, save and restore any variables changed by
expansions (${var=value} and $((var=assigned))), in

sh: Save/restore changed variables in optimized command substitution.

In optimized command substitution, save and restore any variables changed by
expansions (${var=value} and $((var=assigned))), instead of trying to
determine if an expansion may cause such changes.

If $! is referenced in optimized command substitution, do not cause jobs to
be remembered longer.

This fixes $(jobs $!) again, simplifies the man page and shortens the code.

show more ...


# 3bce356e 05-Jun-2011 Attilio Rao <attilio@FreeBSD.org>

MFC


# 47a5ab29 04-Jun-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Reduce more needless differences between error messages.


Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0
# 3835f47c 04-Feb-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Remove special code for shell scripts without magic number.

These are called "shell procedures" in the source.

If execve() failed with [ENOEXEC], the shell would reinitialize itself
and execute

sh: Remove special code for shell scripts without magic number.

These are called "shell procedures" in the source.

If execve() failed with [ENOEXEC], the shell would reinitialize itself
and execute the program as a script. This requires a fair amount of code
which is not frequently used (most scripts have a #! magic number).
Therefore just execute a new instance of sh (_PATH_BSHELL) to run the
script.

show more ...


# b9f69695 30-Jan-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Send messages about signals to stderr.

This is required by POSIX and seems to make more sense.

See also r217557.


# 0d5ccb45 18-Jan-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Fix signal messages being sent to the wrong file sometimes.

When a foreground job exits on a signal, a message is printed to stdout
about this. The buffer was not flushed after this which could

sh: Fix signal messages being sent to the wrong file sometimes.

When a foreground job exits on a signal, a message is printed to stdout
about this. The buffer was not flushed after this which could result in the
message being written to the wrong file if the next command was a builtin
and had stdout redirected.

Example:
sh -c 'kill -9 $$'; : > foo; echo FOO:; cat foo

Reported by: gcooper
MFC after: 1 week

show more ...


# 0a62a9ca 21-Dec-2010 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Add kill builtin.

This allows specifying a %job (which is equivalent to the corresponding
process group).

Additionally, it improves reliability of kill from sh in high-load
situations and ensur

sh: Add kill builtin.

This allows specifying a %job (which is equivalent to the corresponding
process group).

Additionally, it improves reliability of kill from sh in high-load
situations and ensures "kill" finds the correct utility regardless of PATH,
as required by POSIX (unless the undocumented %builtin mechanism is used).

Side effect: fatal errors (any error other than kill(2) failure) now return
exit status 2 instead of 1. (This is consistent with other sh builtins, but
not in NetBSD.)

Code size increases about 1K on i386.

Obtained from: NetBSD

show more ...


# b036c75b 12-Dec-2010 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Various simplifications to jobs.c:
* Prefer kill(-X) to killpg(X).
* Remove some dead code.
* No additional SIGINT is needed if int_pending() is already true.

No functional change is intended.


12345678910>>...12