about summary refs log tree commit diff
path: root/Src/signals.c
Commit message (Collapse)AuthorAgeFilesLines
* 41012: Fix premature exit from nested function in EXIT trap.Peter Stephenson2017-04-271-0/+11
| | | | | | 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.
* 40624: conditionally handle WIFCONTINUED to properly set SP_RUNNING process ↵Barton E. Schaefer2017-02-231-0/+5
| | | | status
* 40353 with tweaks to whence -v: extend directory cache use.Peter Stephenson2017-01-161-2/+5
| | | | | | Now used for all autoloaded functions after load, including those where the file was found along fpath, reducing duplication of directory names.
* 40342: Add directory name cache for autoload file paths.Peter Stephenson2017-01-121-0/+1
| | | | | This renders "autoload /blah/blah/*" as efficient as use of fpath.
* 39548: DEBUG for queueing_enabledBarton E. Schaefer2016-10-031-0/+4
|
* 39436: Pass on status of SIGINT better.Peter Stephenson2016-09-251-0/+1
| | | | | | Set lastval to 128 + SIGINT on interrupt. Don't execute builtin if already interrupted at that point.
* 39359: Fix remaining race with orphaned subjob.Peter Stephenson2016-09-161-3/+13
| | | | | | 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.
* 38094: Fix POSIX EXIT traps defined in function.Peter Stephenson2016-03-071-1/+6
| | | | | These aren't local, so set the local level to 0; else they can get overridden incorrectly.
* 38024: Improve POSIX and native EXIT traps compatibility.Peter Stephenson2016-02-251-1/+6
| | | | | | | Allow a nested function trap to leave save and restore a POSIX trap. Still fails if the POSIX trap was defined in a function.
* 37999: Sticky behaviour of EXIT traps.Peter Stephenson2016-02-171-9/+37
| | | | | | | | 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.
* 36393: process queued signals during dotrap()Barton E. Schaefer2015-09-021-0/+5
|
* 36079: do not allow update_job() and its helpers to run the signal queue ↵Barton E. Schaefer2015-08-101-0/+8
| | | | while we are processing a job exit.
* Don't rely on implicit value when saving background process statusPeter Stephenson2015-08-101-2/+8
|
* 36022 fix bug that some loop constructs could not be interrupted, revise ↵Barton E. Schaefer2015-08-091-2/+6
| | | | | | | | | | | 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.
* Rearrange context saving.Peter Stephenson2015-01-091-2/+2
| | | | | | | 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.
* 33876: etc.: Separate errors and keyboards interruptsPeter Stephenson2014-12-111-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 33531 with additions: retain status of exited background jobs.Peter Stephenson2014-10-261-7/+7
| | | | | | | | 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.
* Merge branch 'master' of git://git.code.sf.net/p/zsh/codeBarton E. Schaefer2014-09-291-1/+1
|\ | | | | | | | | Conflicts: ChangeLog
| * 33285: apply function definition redirections at executionPeter Stephenson2014-09-291-1/+1
| |
* | 33268: interactive shells treat SIGPIPE like SIGHUP if and only if SHTTY is ↵Barton E. Schaefer2014-09-291-0/+13
|/ | | | disconnected
* 32737, 32736 (32741), 32735, 32734, 32733, 32732 (32739): Strict compilationNikolas Garofil2014-06-071-1/+1
| | | | | | | | | | | 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
* 32479: POSIXTRAPS and implicit return values.Peter Stephenson2014-03-141-0/+8
| | | | | | 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.
* unposted: updates for 4.0.2-test-1. zsh-5.0.2-test-1Peter Stephenson2013-11-061-3/+5
| | | | | | Update references to 4.0.2 to 4.0.3. Additional mod_export declarations. Additions to .distfiles.
* 30726: make shell options passed to emulate stick along with the emulationPeter Stephenson2012-10-111-1/+4
|
* unposted: cross-reference zmodload from the modules intro doc.Bart Schaefer2011-09-251-1/+3
| | | | 29769: follow-up 29677 to handle the case where thisjob == -1.
* 29677: Do not allow external processes in a pipeline to become suspendedBart Schaefer2011-08-141-5/+12
| | | | | when the end of the pipe is controlled by a builtin in the current shell which cannot itself become suspended.
* 29643: set incompfunc to zero when executing hook or trap functionPeter Stephenson2011-08-041-1/+3
|
* 29481: always return a matching job in findproc() but scan the whole listBart Schaefer2011-06-151-1/+0
| | | | to prefer running jobs
* 28258: fix undefined variable in trapsPeter Stephenson2010-09-141-4/+3
|
* 28253: document -h argument to atribute commandsPeter Stephenson2010-09-121-4/+6
|
* 28179, users/15314, users/15310, users/15200:Peter Stephenson2010-08-221-104/+125
| | | | various job and process control fixes
* 27951: Add $ZSH_EVAL_CONTEXT and $zsh_eval_contxtPeter Stephenson2010-05-121-1/+1
|
* 27442 plus tweak: wait returns status for $! even if exitedPeter Stephenson2009-12-021-0/+10
|
* 27159: restore pre-23067 behavior of SIGINT outside a "wait", so thatBart Schaefer2009-07-201-11/+20
| | | | foreground jobs that handle or ignore interrupts are not orphaned.
* 27106: reset status on command that expands to emptyPeter Stephenson2009-07-101-0/+1
| | | | 27122: add POSIX_JOBS option
* 26546, 26556: sticky emulation for functions defined in emulate ... -c ...Peter Stephenson2009-02-111-1/+2
| | | | environments, plus documentation
* 25775: fix logical problem with function line numbering inside eval-style trapsPeter Stephenson2008-09-291-0/+8
|
* 25744: dynamic named directories and further doshfunc() simplificationPeter Stephenson2008-09-261-1/+1
|
* 25677: add %x and %I prompt escapes for shell source code debuggingPeter Stephenson2008-09-161-8/+19
| | | | tidy up interface to doshfunc()
* 25247 with further modifications: add $funcsourcetracePeter Stephenson2008-08-111-0/+1
|
* 25415: Make DEBUG_BEFORE_CMD the default.Peter Stephenson2008-08-071-29/+15
| | | | | Reuse ERR_EXIT in DEBUG traps. Clean up trapreturn code.
* fix problems with trapreturn, in particular in source inside trapPeter Stephenson2008-08-011-0/+2
|
* 25345, 25347: neaten interface from main shell to zlePeter Stephenson2008-07-311-1/+1
|
* users/12812: fix hang with confusion over process numbersPeter Stephenson2008-05-021-28/+48
|
* Guillaume Chazarain: 23364: fix race in POSIX signal blockingPeter Stephenson2007-05-011-20/+13
| | | | by using local variables
* Mark an arg as UNUSED().Wayne Davison2007-01-261-1/+1
|
* 23101: various combinations of ZERR with function returns were feature-riddenPeter Stephenson2007-01-121-1/+7
|
* document OS may handle negative or zero PID in killPeter Stephenson2006-12-191-49/+99
|
* 22474: use variable argument lists to improve error message handlingPeter Stephenson2006-05-301-4/+4
|
* Changed some structures to avoid gcc's type-punned warnings.Wayne Davison2006-03-071-4/+4
|