summary refs log tree commit diff
path: root/Src/signals.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* 22317: exit status from code backgrounded in functionPeter Stephenson2006-03-021-20/+39
| | | | | 22277, 22281, tweaks: standardize behaviour of wait builtin with trapped signals
* 21814: error handling for traps in "always" constructs.Bart Schaefer2005-12-151-2/+7
|
* 21197: Fix LOCAL_TRAPS inside another trapPeter Stephenson2005-04-271-1/+8
|
* fix autoloaded trap bug; rejig use of trapfuncsPeter Stephenson2005-02-061-22/+66
| | | | (now traplists); improve trap tests
* c.f. 20675: improve zle as a basis for Unicode.Peter Stephenson2005-01-141-1/+1
| | | | unposted: update version to 4.2.3-dev-1
* 20576: fix core dump on TRAPEXITPeter Stephenson2004-11-231-1/+13
|
* 20572: Allow alternative signal namesPeter Stephenson2004-11-221-9/+6
|
* 20467: Reintroduce rusage-based escapes for TIMEFMT.Peter Stephenson2004-10-081-13/+26
|