| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Previously the shell didn't take account of signals marked as
ignored on entry, which was inconsistent with other behaviour.
|
|
|
|
|
|
|
|
|
|
|
| |
Be more consistent about marking both superjob and subjob as
running when sending SIGCONT.
Send SIGCONT to superjob / subjob combination any time it is put
in foreground, even if thought running, since subjob may invisibly
have suspended.
When waiting for superjob, wait for subjob, too.
|
|
|
|
|
|
|
|
|
| |
If list_pipe_job triggered more than once we need to know
the most recent process group leader, so record that
both if the attach happened in the main shell on in
entersubsh().
Also don't pass back proocess group for ESUB_ASYNC subshells.
|
| |
|
| |
|
|
|
|
| |
This could happen when kiiling a job. The processs might be reused.
|
|
|
|
|
|
| |
Only do this if killpg(dead_pid, 0) returns -1, indicating
the pgprp doesn't exist any more, else there is a race
if other proceses have started using it.
|
|
|
|
|
| |
We shouldn't do any fix ups unless the process has actually
exited.
|
|
|
|
|
|
|
|
|
| |
If process group leader exits, allow a newly forked process to become
process leader. If a foreground job, reattach the shell to the
terminal until that happens.
Unblock signals when reading output for command subsitution so that
we can do this reattaching immediately.
|
|
|
|
|
|
|
|
| |
It now operates separately at each function depth.
To keep ERR_EXIT global, make the noerrexit variable usd bit flags.
Extend tests.
|
|
|
|
|
|
| |
Also add check so we don't delay an exit if we were already in
an EXIT trap for the main shell, as we should in that case leave
immediately.
|
|
|
|
| |
status
|
|
|
|
|
|
| |
Now used for all autoloaded functions after load, including those
where the file was found along fpath, reducing duplication of
directory names.
|
|
|
|
|
| |
This renders "autoload /blah/blah/*" as efficient as use of
fpath.
|
| |
|
|
|
|
|
|
| |
Set lastval to 128 + SIGINT on interrupt.
Don't execute builtin if already interrupted at that point.
|
|
|
|
|
|
| |
When shell is forked to run right hand side of pipieline it should
use its own PID as process group if the left hand side of the
pipeline has already exited.
|
|
|
|
|
| |
These aren't local, so set the local level to 0; else they can get
overridden incorrectly.
|
|
|
|
|
|
|
| |
Allow a nested function trap to leave save and restore a POSIX
trap.
Still fails if the POSIX trap was defined in a function.
|
|
|
|
|
|
|
|
| |
They now have POSIX or non-POSIX behaviour based on the setting
of POSIX_TRAPS where the trap was defined, rather than where the
trap would (or would not) be executed.
Tweaks possible.
|
| |
|
|
|
|
| |
while we are processing a job exit.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
signal queueing
There are two underlying ideas here: (1) Keeping signals queued around
anything that's doing memory management (including push/pop of the heap)
has become crucial. (2) Anytime the shell is going to run a command, be
it buitin or external, it must be both safe and necessary to process any
queued signals, so that the apparent order of signal arrival and command
execution is preserved.
|
|
|
|
|
|
|
| |
Variables are now associated with the module that declares them, being
initialised and saved/restored there. However, as many variables are
used for communication between modules, many of them are set in multiple
places, so the assignment is ambiguous.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Combination of 12 commits from interrupt_abort branch.
Basic strategy is to introduce bits to errflag and to set and
reset them separately.
Remove interrupt status on return to main keymap.
Turn off ERRFLAG_INT for always block.
Restore bit thereafter: we probably need a new variable in order
to allow user interrupts to be reset in the always block.
Add TRY_BLOCK_INTERRUPT
This works the same as TRY_BLOCK_ERROR, but for a SIGINT, too.
Ensure propagation of SIGINT from exited job.
If received by foreground job, shell uses ERRFLAG_INT, not
ERRFLAG_ERROR, to set the new state.
Reset errflag before precmd()
Add always block in _main_completion to fix ZLS_COLORS
Ensures we get the right state of $ZLS_COLORS at the end of _main_complete
even if there's an interrupt. However, the "right state" is a bit messy
as it depends on styles.
|
|
|
|
|
|
|
|
| |
Add linked list of unwaited-for background jobs.
Truncate at value of _SC_CHILD_MAX discarding oldest.
Remove old lastpid_status mechanism for latest exited process only.
Slightly tighten safety of permanently allocated linked lists so
that this doesn't compromise signal handling.
|
|\
| |
| |
| |
| | |
Conflicts:
ChangeLog
|
| | |
|
|/
|
|
| |
disconnected
|
|
|
|
|
|
|
|
|
|
|
| |
fixes
Src/utils.c: properly ifdef declarations
Src/zsh_system.h: memmove() should return its dest argument
Src/signals.c: define ret before use
Src/mem.c: remove unused pointers
Src/prototypes.h: use size_t in bcopy()
Src/compat.c: fix const declaration inconsistency
|
|
|
|
|
|
| |
With POSIXTRAPS never propagate implicit return value.
In any case if not forcing a return value don't use lastval
from within the trap, use the one from the surrounding code.
|
|
|
|
|
|
| |
Update references to 4.0.2 to 4.0.3.
Additional mod_export declarations.
Additions to .distfiles.
|
| |
|
|
|
|
| |
29769: follow-up 29677 to handle the case where thisjob == -1.
|
|
|
|
|
| |
when the end of the pipe is controlled by a builtin in the current shell
which cannot itself become suspended.
|
| |
|
|
|
|
| |
to prefer running jobs
|
| |
|
| |
|
|
|
|
| |
various job and process control fixes
|
| |
|
| |
|
|
|
|
| |
foreground jobs that handle or ignore interrupts are not orphaned.
|
|
|
|
| |
27122: add POSIX_JOBS option
|
|
|
|
| |
environments, plus documentation
|
| |
|
| |
|
|
|
|
| |
tidy up interface to doshfunc()
|
| |
|