| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
If we can't grab the terminal in interactive mode, give
up after 100 goes. This is a completely arbitrary choice;
we simply don't know what in the system could change the
result of looping further.
|
|
|
|
| |
crashed the shell
|
|
|
|
|
| |
Fix exit statuses from wait for POSIX_BUILTINS mode.
Also add tests.
|
|
|
|
|
| |
Show subjob status instead of user-visible superjob any time
the subjob still has associated processes.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Attempt to keep STAT_STOPPED correct for superjob, rendering additional
"stopped = 1" unnecessary.
Wait for subjob before superjob.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Fix additional races by passing back use of list_pipe_job
from subshell.
|
|
|
|
|
|
|
|
|
| |
A newly forked subshell now reports back the process group it
will be using for the main shell to record.
This prevents an error where the shell incorrectly thought an
exiting process owned the terminal and so grabbed it back,
putting the foreground process into the background.
|
|
|
|
| |
This avoids proliferating #ifdef's.
|
|
|
|
|
|
| |
Background jobs that had just exited could still be in
the table when the process had already finished and the
status was recorded, causing the wrong status to be reported.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This is a job forked from the current shell when a job partly
running from the current shell was suspended. When all associated
processes started from the main shell are finished the job is
continued and at this point the disown can complete.
|
|
|
|
|
| |
This typical applies to a STAT_SUPERJOB. It prevents it from
getting copied interrupts as a foreground process.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes case of
v() { { vim - } always { true } }
ls | v
^Z
fg
Tentative fix: still a race at exit where zsh forked by ^Z
is stopped when restarted.
|
|
|
|
| |
interrupt signal, even if the current shell has been interrupted.
|
|
|
|
|
|
| |
If the child's resisdent set size in megabytes exceeds this, print
out the resource (TIMEFMT) string. Document you need to add memory
usage to this by hand.
|
| |
|
| |
|
| |
|
|
|
|
| |
another race condition
|
| |
|
|
|
|
| |
Leaving these hanging in parent could cause deadlock: test added.
|
|
|
|
| |
Update job status as well as process status.
|
|
|
|
|
|
| |
text is an array in the struct, and can never be null.
Found by Coverity (Issue 1255780).
|
|
|
|
| |
in a linux pid namespace)
|
|
|
|
| |
return 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Add test for both this and 33345+33346
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
printjob() should not reference oldjobtab for job numbers unless it is being called from bin_fg(). printjob() also must not attempt to update pipestats when called from bin_fg(). acquire_pgrp() should not loop infintely if the shell is not interactive. Update the $pipestatus stress test so that it also exercises the oldjobtab repair.
|
| |
|
| |
|
| |
|
|
|
|
| |
Close applicable file descriptors when waiting for a job.
|
| |
|