summary refs log tree commit diff
path: root/Src/exec.c
Commit message (Collapse)AuthorAgeFilesLines
* Rearrange context saving.Peter Stephenson2015-01-091-4/+4
| | | | | | | 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.
* 34134: anon funcs: don't leak shf and related dataMikael Magnusson2015-01-061-0/+6
| | | | Found by Coverity (Issue 439076).
* 34064: assignment before command replaces array with export even when KSH_ARRAYSTakeshi Banse2014-12-271-0/+2
|
* 34065: following an "if" condition, do not test lastval for ERR_EXIT until a ↵Barton E. Schaefer2014-12-271-0/+4
| | | | | | new command is run Includes unposted regression tests.
* 33876: etc.: Separate errors and keyboards interruptsPeter Stephenson2014-12-111-21/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 33818: fix types passed to sizeof detected by coverity as being wrongOliver Kiddle2014-11-301-2/+2
|
* 33816, 33819: GLOB_ASSIGN changes integer and floating type variables to ↵Barton E. Schaefer2014-11-281-1/+9
| | | | string scalars
* 33775: error opening file in $(<...) is not fatalBarton E. Schaefer2014-11-231-2/+2
|
* 33614 (based on RedHat BZ-978613): signal safety when updating global state ↵Barton E. Schaefer2014-11-061-0/+6
| | | | in execshfunc()
* Treat exec from subshell as if forkedPeter Stephenson2014-11-021-0/+9
| | | | | This removes weird behaviour when optimising the last command. In particular SHLVL is correct from a subshell executed as the last command.
* 33531 with additions: retain status of exited background jobs.Peter Stephenson2014-10-261-2/+0
| | | | | | | | 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.
* 33493: use correct command name in error messages about "ulimit" failure; ↵Barton E. Schaefer2014-10-221-0/+1
| | | | restore internal copy of limits if setrlimit() fails, so the error won't repeat
* 33365: avoid buffer overflow for very long fds in >& fd syntaxMikael Magnusson2014-10-061-1/+1
|
* 33325: fix ksh autoloads with redirections on function definitionsPeter Stephenson2014-10-021-19/+63
|
* Merge branch 'master' of git://git.code.sf.net/p/zsh/codeBarton E. Schaefer2014-09-291-4/+88
|\ | | | | | | | | Conflicts: ChangeLog
| * 33286: handle redirections for multiply named functionsPeter Stephenson2014-09-291-1/+16
| |
| * 33285: apply function definition redirections at executionPeter Stephenson2014-09-291-4/+73
| |
* | 33268: interactive shells treat SIGPIPE like SIGHUP if and only if SHTTY is ↵Barton E. Schaefer2014-09-291-0/+2
|/ | | | disconnected
* 33100: check $fd more rigorously in "exec {fd}<&-"Barton E. Schaefer2014-09-031-6/+18
|
* 33077: SHTTY = -1 when closing it in closem()Barton E. Schaefer2014-08-311-1/+4
|
* 32768 with further modifications: LOCAL_LOOPS option.Peter Stephenson2014-06-131-2/+15
|
* 32568: consistency in handling of errflag condition during substitutionsBarton E. Schaefer2014-04-201-2/+9
| | | | | Affects for/select word lists, function definition name position, and anonymous function argument lists.
* 32552 (updated by 32560): fix segfault when using process substitution in ↵Andrew Waldron2014-04-181-8/+18
| | | | | | anonymous function argument list Also disallow process substitution in function name position.
* 32176: plug additional deadlock-inducing pipe descriptor leaksPeter Stephenson2013-12-211-1/+4
|
* 32171: close pipe descriptor in parent when left side is a shell construct toBarton E. Schaefer2013-12-201-0/+4
| | | | | | prevent deadlock Also clean up ChangeLog entry that attributed 32119 to 32114
* 32091: WARN_CREATE_GLOBAL false positive.Daniel Shahaf2013-12-061-1/+4
| | | | In cases like () { foo=bar =true; }
* 31919: fix deadlock when a shell builtin with a multio redirection is used ↵Barton E. Schaefer2013-10-271-2/+2
| | | | | | | | | on the left side of a pipeline Make sure stdin/out/err file descriptors are closed for the multio copy process, which means not re-using those descriptors after they are closed and marked FDT_UNUSED in fdtable[]. For completeness, initialize their fdtable[] state to FDT_EXTERNAL.
* 31912: in closemn(), distinguish closing for >&- from closing for a real ↵Barton E. Schaefer2013-10-271-5/+5
| | | | | | redirect Fixes knock-on multios bug introduced by workers/20666 way back in 2005.
* Use VERBOSE option in execstring()Peter Stephenson2013-10-191-0/+5
|
* 31846: fix NOEXEC option in execsimple() optimisationPeter Stephenson2013-10-181-0/+3
|
* 31832: make execrestore() more signal-safe.Bart Schaefer2013-10-171-23/+27
|
* 31809: Make whitespace clear in trace output for patterns.Peter Stephenson2013-10-101-0/+13
|
* 31549: Fix third problem with file descriptor management.Peter Stephenson2013-07-211-17/+1
| | | | | Replace ad-hoc subsh_close file descriptor for pipe management with the new job-based addfilelist() mechanism.
* 31545: Use of FD_CLOEXEC to remove possibility of fd reuse.Peter Stephenson2013-07-201-0/+2
| | | | | File descriptors of mmap'd dump files are closed if and only if an exec is performed.
* 31528: use job table to record file descriptors associated with process substPeter Stephenson2013-07-171-27/+6
|
* 31444: Basic code for enable/disable -pPeter Stephenson2013-06-131-0/+5
|
* 31376: Make sure every execve() is prefixed by winch_unblock()Frank Terbeck2013-05-051-0/+6
| | | | This was suggested by Bart Schaefer in 31375.
* Revert "31372: Do not block SIGWINCH for child processes"Frank Terbeck2013-05-051-3/+1
| | | | | | This reverts commit f8ab02ad5f4226e46ab54e681a3e0404fdc1a9a6. As Bart suggested in 31375.
* 31372: Do not block SIGWINCH for child processesBart Schaefer2013-05-051-1/+3
| | | | Something similar may also be needed in the zpty and clone modules.
* 31141: Tighten NO_CLOBBER restrictions on {fd} syntaxPeter Stephenson2013-03-101-1/+8
| | | | to apply only if $fd is exactly an fd and nothing else.
* 30876: fix obscure failures to propagate non-zero statusPeter Stephenson2012-12-131-3/+3
| | | | from optimised simple commands within lists
* 30726: make shell options passed to emulate stick along with the emulationPeter Stephenson2012-10-111-6/+101
|
* 30724: shell code optimisd to use execsimple() doesn't have a valid thisjobPeter Stephenson2012-10-111-3/+24
|
* 30722: fix some cases where emulations or options were not propagated properlyPeter Stephenson2012-10-071-1/+1
| | | | from the emulate command
* 30633: "functions -T" only traces marked function, not called functionsPeter Stephenson2012-08-211-2/+13
|
* 30307 plus tweak suggsted by Wayne: use %lld for zlong when long longPeter Stephenson2012-03-051-0/+4
|
* 30272 (tweaked): most failures of fork() cause non-interactive shells toBart Schaefer2012-03-011-11/+12
| | | | exit nonzero; bad options to "exec" cause exit under POSIX_BUILTINS.
* 30181, plus rename of PF_* flags to PREFORK_*:Peter Stephenson2012-02-121-3/+3
| | | | | | Pass sh-wordsplitting instructions to paramsubst() using flags, avoiding side effects of explicitly setting and unsetting the SHWORDSPLIT option.
* 30111: Src/exec.c: Fix segfaults with exec options.Frank Terbeck2012-01-161-1/+12
|
* 30000 plus some comments: Better POSIXJOBs behaviour.Peter Stephenson2011-12-121-4/+25
| | | | | | Don't restore default SIGTTOU etc. behaviour if still doing job control. Only carry on doing job control in subshell if it's a real (...) subshell