Peter Stephenson
97d4bdbc7e
41590 modified as 41595: make ERR_RETURN more logical.
...
It now operates separately at each function depth.
To keep ERR_EXIT global, make the noerrexit variable usd bit flags.
Extend tests.
2017-08-24 19:46:20 +01:00
Peter Stephenson
ddb8675901
posted but has not shown up: fix fd problem in subshell.
...
Record fd's that have been saved in fdtable and if the shell
forks close them as they will never be restored.
2017-08-15 20:49:23 +01:00
Peter Stephenson
d4b94b5e83
41464, 41466: With POSIX_BUILTINS, exec only executes sexternal commands.
...
Document the default behaviour and add a test.
2017-07-27 09:22:04 +01:00
Barton E. Schaefer
a5ed661f25
41317: use heap allocation in getoutputfile() to plug memory leak
...
Heap is usable ever since addfilelist() of workers/31528 (commit 3c573222
).
2017-06-19 16:06:38 -07:00
Peter Stephenson
21b195562a
41043: Close pipes in shell when disowning background job.
...
This was missing in the case of &,, causing a file descriptor leak.
2017-05-03 11:30:15 +01:00
Peter Stephenson
ed4e37e45c
41020: Fix "command -p"; "-p" was incorrectly left in command arguments
...
Also add tests for known precommand modifier issues.
2017-04-28 10:22:43 +01:00
Peter Stephenson
d7110d8f01
41012: Fix premature exit from nested function in EXIT trap.
...
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.
2017-04-27 18:56:18 +01:00
Peter Stephenson
408b92b168
41008: Handle expansions for precommand modifiers
2017-04-26 09:44:38 +01:00
Peter Stephenson
8b5102ccf5
40933: Ensure we get job text in sourced files.
...
This was turned off explicitly as it was assumed not to be needed,
but it is when code in a sourced file is suspended.
We'll need to see if this makes start up inefficient.
2017-04-04 18:54:10 +01:00
Peter Stephenson
64559abc1f
40796: MAGIC_EQUAL_SUBST not needed with parsed assignment.
...
If typeset family builtins are recognised as keywords then the value
is handled as a separate expansion and we don't need the old
magic behaviour, even if the option is set.
2017-03-09 09:52:23 +00:00
Peter Stephenson
f3f8537cfa
40760: Always tokenize unquoted - to Dash.
...
This fixes use of pattern match character ranges in unusual contexts.
Attempt to detect a tokenized - in cases where we don't care.
2017-03-07 10:43:58 +00:00
Barton E. Schaefer
5e61eaf855
40654: exit cleanly from special POSIXBUILTINS in subshells
...
This patch overloads the zsh_subshell counter which is meant for $ZSH_SUBSHELL, but no one has suggested a working alternate test.
2017-03-04 15:25:17 -08:00
Barton E. Schaefer
9f447578f0
40576 (tweaked): entersubsh(): unblock any signals that were blocked for trap handling
...
Also small improvement to loop that resets trap handlers
2017-02-20 13:26:49 -08:00
Peter Stephenson
c861b17bbf
40391: Add WARN_NESTED_VAR option and functions -W.
...
These are companions to WARN_CREATED_GLOBAL, warning when a variable
from an enclosing scope is altered.
2017-01-23 09:50:57 +00:00
Peter Stephenson
f90a0447aa
40353 with tweaks to whence -v: extend directory cache use.
...
Now used for all autoloaded functions after load, including those
where the file was found along fpath, reducing duplication of
directory names.
2017-01-16 10:31:56 +00:00
Peter Stephenson
178e62dbfe
40342: Add directory name cache for autoload file paths.
...
This renders "autoload /blah/blah/*" as efficient as use of
fpath.
2017-01-12 20:56:20 +00:00
Peter Stephenson
33799ae2b0
40335: More care with autoload function path.
...
If doing "autoload -X", the path present might actually be location
of file containing the function with the autoload -X. Add
an explicit flag to say it's a directory for autoload.
2017-01-12 13:54:29 +00:00
Peter Stephenson
47b7f2adef
unposted: more care with shell function filename.
...
When updating shfunc structure to change filename we should be
careful to free whatever's there already, we may now be the
directory in which to find the function definition. After loading
the field contains the full name of the file.
2017-01-11 12:11:22 +00:00
Peter Stephenson
f26d1ba6b0
Add features associated with autoloading a function using an absolute
...
path.
-d defaults to normal fpath
-r remembers the path without actually loading. May be combined with -d.
-R does the same but it's an error if not found
-X can now take a directory path: this is used to output not yet loaded
functions that have an associated path.
2017-01-11 11:26:13 +00:00
Peter Stephenson
0e4aa6f2f6
Additional case for ERR_RETURN and ERR_EXIT.
...
Don't trigger just because status is non-zero at end of
current shell group.
2016-12-05 12:29:23 +00:00
Peter Stephenson
c03228f9ed
Extra case for ERR_RETURN and ERR_EXIT.
...
Don't trigger just because status is non-zero at end of
complex shell construct as this may be a case we've already
suppressed.
2016-12-05 11:21:01 +00:00
Peter Stephenson
a62e1640bc
39958: Add extra byte to PATH_MAX allocations.
...
This ensures we've got enough space for a null, although this
isn't always needed.
2016-11-17 19:49:17 +00:00
Daniel Shahaf
c392e6c620
39915: whence: Honor PATH_DIRS option for arguments that start with './' or '../'.
...
While here, add some docstrings.
2016-11-17 15:28:42 +00:00
Peter Stephenson
5f1700755f
39901: No EXIT trap on LHS of pipeline.
...
There is a special case if the LHS is a shell construct.
Add unit tests for both cases.
2016-11-10 10:37:27 +00:00
Peter Stephenson
bcb52460f3
39571: Fix ERR_EXIT bug with && and function.
...
"foo && bar" inside a function could cause the code outside
the function not to perform ERR_EXIT or ERR_RETURN when needed.
2016-10-05 17:46:42 +01:00
Peter Stephenson
0854ee56bc
39568: "! <complex-command>" suppresses ERR_EXIT
2016-10-05 13:52:31 +01:00
Peter Stephenson
dc517212ca
39566: Improve usefulness of command_not_found_handler.
...
Don't behave as if command not found if return status is non-zero
as this may simply be the return status of the replacement command.
Let the function report a command not found instead.
2016-10-05 12:14:43 +01:00
Peter Stephenson
4ab3fcc90d
39545: Add some missing unqueue_signals().
...
All of these are added simply to fit existing logic in other branches.
2016-10-03 13:43:20 +01:00
Peter Stephenson
36a11804b4
39521: Refactor start of execcmd().
...
By splitting into _analyse and _exec execpline2() has easier
access to the state at the start of execution. Use this
to ensure we fork if this is a builtin with no arguments.
2016-10-03 09:59:01 +01:00
Peter Stephenson
6b2585147b
39540: "! command" should suppress ERR_EXIT and ERR_RETURN
2016-10-02 19:17:19 +01:00
Peter Stephenson
bb2bbcc944
39517: back off 39502 (WC_ASSIGN causes fork in pipe).
...
This isn't a robust fix as WC_ASSIGNs simply precede the main wordcode.
2016-09-30 11:34:15 +01:00
Barton E. Schaefer
736eb433ba
39507: TMPSUFFIX for =(...)
2016-09-29 14:55:49 -07:00
Barton E. Schaefer
e61ed2b80d
39470: failure to open a supposedly unique temp file name should result in an error
...
Also band-aid for signal-related race conditions in temp file name generation
2016-09-29 11:16:24 -07:00
Peter Stephenson
6ce696f352
39502: Fork for assignment in LHS of pipeline.
...
foo=bar | stuff
left the value of foo set to bar as we didn't realise we needed to
fork.
2016-09-29 17:29:58 +01:00
Peter Stephenson
07c8fbe596
34943: Fixes for "command" with multiple options.
...
These need to combine properly, and alos "command -p" with either
-v or -V needs to search for builtins and then using the default
system path.
2016-09-29 11:01:00 +01:00
Barton E. Schaefer
3b6002e53d
39437: use list_pipe_pid in assignment for clarity
2016-09-27 08:48:49 -07:00
Peter Stephenson
e35dcae40f
39436: Pass on status of SIGINT better.
...
Set lastval to 128 + SIGINT on interrupt.
Don't execute builtin if already interrupted at that point.
2016-09-25 19:18:43 +01:00
Peter Stephenson
759e5912fd
39435: Further fix for pgrp of funny pipelines.
...
Don't set gleader of SUBJOB at the point of creation if the
SUPERJOB has no processes yet.
2016-09-25 17:14:24 +01:00
Barton E. Schaefer
c8de0af359
39381: handle save/restore of variable values when "typeset"-related reserved words are prefixed by an assignment
2016-09-19 00:26:10 -07:00
Peter Stephenson
c355a5f41f
39362: another race with pipeline handling.
...
When forking the shell to control the right hand side, the
forked subshell now always starts its own process group, to
avoid getting a spurious additional SIGSTOP.
2016-09-16 21:55:55 +01:00
Peter Stephenson
327f3dd3ad
39359: Fix remaining race with orphaned subjob.
...
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.
2016-09-16 17:23:12 +01:00
Peter Stephenson
01ae64c0d7
39331: Reparent subjob on fork with exited superjob.
...
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.
2016-09-16 09:39:33 +01:00
Peter Stephenson
23c1c774b9
39305: Fix error handling after parse for here document.
...
Keep the error status the same as before, but also retain
the interrupt status if that was non-zero.
2016-09-13 09:37:49 +01:00
Stephane Chazelas
8ce98c75f5
39125: More care needed decrementing SHLVL on exec.
...
Not needed in subshell.
2016-08-31 10:21:00 +01:00
Barton E. Schaefer
b312abc93b
39104: do not hash relative paths in findcmd()
2016-08-26 15:05:15 -07:00
Daniel Shahaf
f026a4dc12
38991: Make 'whence -v autoloaded-function' shows the defining filename.
...
This may also fix a problem whereby the %x prompt escape evaluated to
a function name rather than a filename, since %x is also backed by
scriptfilename.
2016-08-05 12:37:26 +00:00
Daniel Shahaf
7badf262c1
38653 + 38657: 'functions -T' tracing: recurse into anonymous functions.
2016-06-13 08:53:18 +00:00
Barton E. Schaefer
5ee05cf935
38350 (cf. Glenn Smith: 38348): Remove-all warning should warn about the root directory as well
2016-04-26 10:40:56 -07:00
Peter Stephenson
f4dfca490c
38114: Fix hang using ^Z with command subst.
...
In subshells started to perform substitutions disable signals
that require interactive handling.
2016-03-09 09:51:14 +00:00
Jun-ichi Takimoto
a4020e10a3
37868: add 'static' to file local variables
2016-02-03 01:25:33 +09:00
Barton E. Schaefer
5c17f9ab3f
37473: check for cshnullglob in command position.
2016-01-01 13:01:16 -08:00
Barton E. Schaefer
fc344465f2
37435 (+ fix typo): allow execution of empty files as "sh" scripts
2015-12-25 00:31:32 -08:00
Barton E. Schaefer
a554c7403a
37434: POSIXBUILTINS "command" should prevent shell exit on errors from special builtins
2015-12-25 00:26:26 -08:00
Peter Stephenson
e40a14c5e4
37202: suppress WARN_CREATE_GLOBAL warnings after a fork
2015-12-04 10:44:33 +00:00
Peter Stephenson
04479a56e0
unposted: fix init_io() calls in previous change
2015-12-04 09:42:35 +00:00
Peter Stephenson
830d54e629
37092: make nested ${(P)name} properly refer to parameter on return
2015-11-11 18:04:20 +00:00
Barton E. Schaefer
827d360776
36853: replace pushheap/popheap by NEWHEAPS/OLDHEAPS in doshfunc() to optimize memory management
...
Includes re-indentation that was not done in the posted patch.
2015-10-14 21:46:26 -07:00
Barton E. Schaefer
cb26e11c70
unposted: back out 36707, add test case for 36766
2015-10-03 22:11:09 -07:00
Barton E. Schaefer
b581c3fece
36766: fix incorrect reset of noerrexit during "if" conditions
2015-10-03 19:40:14 -07:00
Barton E. Schaefer
2bf4f667fb
36707: distinguish ERR_RETURN value of retflag so that execif() can ignore it in the test sublist
2015-09-30 20:01:13 -07:00
Daniel Shahaf
2654cb43f6
36651: WARN_CREATE_GLOBAL += math expressions
...
Without this, '() { (( x=42 )) }' and '() { for (( i=0; … )) }' wouldn't warn
about $x and $i, respectively, being created global.
2015-09-27 23:52:25 +00:00
Peter Stephenson
cdbd1b2581
36378: skip directories when looking for files to autoload
2015-09-02 20:19:28 +01:00
Barton E. Schaefer
128bf385b1
36104: change order of child_block() and dont_queue_signals() to resolve yet another race condition
2015-08-11 08:55:23 -07:00
Barton E. Schaefer
9958684574
36022 fix bug that some loop constructs could not be interrupted, revise 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.
2015-08-09 16:13:52 -07:00
Peter Stephenson
28a962f557
35849: close fd's from process substitution after fork
...
Leaving these hanging in parent could cause deadlock: test added.
2015-07-23 09:34:11 +01:00
Peter Stephenson
3af55c858f
35751: Fix ERR_RETURN and ERR_EXIT in "else"
2015-07-09 14:59:20 +01:00
Peter Stephenson
7708849b21
35655: APPEND_CREATE option for POSIX copmatible NO_CLOBBER
2015-06-29 19:01:31 +01:00
Barton E. Schaefer
ef08028346
35634: handle failure of gettempname() in namedpipe()
2015-06-27 12:50:40 -07:00
Peter Stephenson
b16d754d9c
35604: create empty arrays in typeset with array=()
2015-06-25 17:01:48 +01:00
Peter Stephenson
39b28980f3
various posts: Implement assignment parsing for typeset.
...
Typeset assignments now work like raw assignments except
for no "+=" and no GLOB_ASSIGN.
Documented in typeset builtin doc and mentioned in release notes.
Tests to ensure basic sanity.
Enabled by default, can be turned off by "disable -r" with typeset
family of commands.
2015-06-24 10:21:12 +01:00
Barton E. Schaefer
2cfe892414
35493: erase $_ when the command line is an assignment
2015-06-16 17:03:39 -07:00
Mikael Magnusson
4dc4e23376
GLOB_ASSIGN should only affect scalar assignments
2015-06-02 16:09:35 +02:00
Peter Stephenson
2b08d0ed67
35318: POSIX_BUILTINS behaviour for getopts.
...
It needs to keep OPTIND, as well as the index within the
string pointed to by OPTIND, global in this case.
2015-05-28 18:32:39 +01:00
Peter Stephenson
2f6a8a6c6c
Tweak test for function level of exit.
...
Sometimes local level jumps so we need an inequality instead
of an equality.
2015-05-22 23:37:45 +01:00
Peter Stephenson
ec57c91b58
users/20203: nested functions in always blocks when exit pending
2015-05-13 16:17:04 +01:00
Peter Stephenson
c96a993d51
34989: AUTO_CD needs to call cd --.
...
Otherwise directories looking like options do the wrong thing.
2015-04-28 20:42:26 +01:00
Peter Stephenson
df5115a741
34979: Preserve job text when doing shell job fix.
...
This handles list_pipe_text in execlist() along with other
variables that are saved and restored and, in the special
case of source, cleared.
2015-04-28 09:22:37 +01:00
Peter Stephenson
e0cdf39fd9
34955: save and restore list_pipe_job with its friends
...
This is needed to stop source() messing up job control.
2015-04-24 16:34:51 +01:00
Peter Stephenson
3bf8cab82e
34900: assignment before an "exec".
...
Without POSXIBUILTIN: restore after, so we only get side effects.
With POSXIBUILTIN: keep set variable
2015-04-15 21:16:17 +01:00
Peter Stephenson
a2c579050f
34887: Fix POSIX_BUILTINS with assignment.
...
In the form
var=val command special-builtin-or-func
the var is restored after execution, unlike the case where "command"
is absent.
Clear up case in code that handles this.
Add tests.
2015-04-15 09:44:19 +01:00
Barton E. Schaefer
a4ff8e6957
34590: queue_signals() around more scopes that manipulate global state
2015-02-20 18:45:36 -08:00
Peter Stephenson
8ebe18c081
34530: PRINT_EXIT_VALUE with anonymous functions.
...
Simpler fix, avoiding structural changes.
2015-02-16 12:37:38 +00:00
Peter Stephenson
daa7d99702
34546: further $_ with anon function fix.
...
Also add tests.
2015-02-13 21:31:31 +00:00
Peter Stephenson
7e6faf7237
34519: $_ for arguments of anonymous function
2015-02-12 19:48:50 +00:00
Barton E. Schaefer
7398fea059
34514: Back out 34485, an alternate solution needs to be worked out.
...
(Tweaked to keep the unrelated hunk of the E01 test.)
2015-02-12 09:27:53 -08:00
Peter Stephenson
da86d6b4f2
34485: More rationalisation for anonymous functions.
...
Don't attempt to treat as "simple" case as there are too many
hidden problems.
Pull out some post-execution functions to a common case in
execcmd().
2015-02-09 16:39:29 +00:00
Peter Stephenson
e6d9642467
users/19751: remove error on failure to close file descriptor by number.
...
Keep it when closing file descriptor stored in a variable, i.e.
explicitly opened by the user.
2015-01-20 09:29:22 +00:00
Peter Stephenson
c6c9f5daf2
34322: bug with interface to parsestr() etc.
...
Was showing up in places like ${(e)...} where command substitution
could reallocate the token string, but actually there was never any
guarantee that the lexer wouldn't do that, so this was always
a bit iffy.
2015-01-18 22:38:57 +00:00
Peter Stephenson
cfd91eac07
Rearrange context saving.
...
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.
2015-01-09 21:33:39 +00:00
Mikael Magnusson
bd2175fe7d
34134: anon funcs: don't leak shf and related data
...
Found by Coverity (Issue 439076).
2015-01-06 23:50:37 +01:00
Takeshi Banse
1cd8023570
34064: assignment before command replaces array with export even when KSH_ARRAYS
2014-12-27 22:05:05 -08:00
Barton E. Schaefer
d6a32ddeed
34065: following an "if" condition, do not test lastval for ERR_EXIT until a new command is run
...
Includes unposted regression tests.
2014-12-27 21:55:58 -08:00
Peter Stephenson
d067ebcacd
33876: etc.: Separate errors and keyboards interrupts
...
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.
2014-12-11 09:41:17 +00:00
Oliver Kiddle
0d4b548d1e
33818: fix types passed to sizeof detected by coverity as being wrong
2014-11-30 23:19:55 +01:00
Barton E. Schaefer
49d6aace41
33816, 33819: GLOB_ASSIGN changes integer and floating type variables to string scalars
2014-11-28 13:30:22 -08:00
Barton E. Schaefer
2b615bedaf
33775: error opening file in $(<...) is not fatal
2014-11-23 16:02:48 -08:00
Barton E. Schaefer
7abd611a23
33614 (based on RedHat BZ-978613): signal safety when updating global state in execshfunc()
2014-11-06 10:50:20 -08:00
Peter Stephenson
023c2236e1
Treat exec from subshell as if forked
...
This removes weird behaviour when optimising the last command.
In particular SHLVL is correct from a subshell executed as the last
command.
2014-11-02 15:29:06 +00:00
Peter Stephenson
b4f7ccecd9
33531 with additions: retain status of exited background jobs.
...
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.
2014-10-26 17:47:42 +00:00
Barton E. Schaefer
2d4743ce50
33493: use correct command name in error messages about "ulimit" failure; restore internal copy of limits if setrlimit() fails, so the error won't repeat
2014-10-22 08:42:37 -07:00
Mikael Magnusson
49a3086bb6
33365: avoid buffer overflow for very long fds in >& fd syntax
2014-10-06 20:34:28 +02:00
Peter Stephenson
f16813792e
33325: fix ksh autoloads with redirections on function definitions
2014-10-02 16:15:10 +01:00
Barton E. Schaefer
32473f59a3
Merge branch 'master' of git://git.code.sf.net/p/zsh/code
...
Conflicts:
ChangeLog
2014-09-29 17:52:33 -07:00
Peter Stephenson
8cb67e721b
33286: handle redirections for multiply named functions
2014-09-29 21:31:37 +01:00
Peter Stephenson
cf6b0f5663
33285: apply function definition redirections at execution
2014-09-29 21:02:59 +01:00
Barton E. Schaefer
60e31a45b0
33268: interactive shells treat SIGPIPE like SIGHUP if and only if SHTTY is disconnected
2014-09-29 08:59:31 -07:00
Barton E. Schaefer
a3b1e3ffb1
33100: check $fd more rigorously in "exec {fd}<&-"
2014-09-03 08:46:56 -07:00
Barton E. Schaefer
839a72de10
33077: SHTTY = -1 when closing it in closem()
2014-08-31 13:53:25 -07:00
Peter Stephenson
b5198b10a1
32768 with further modifications: LOCAL_LOOPS option.
2014-06-13 21:39:44 +01:00
Barton E. Schaefer
848badaa5f
32568: consistency in handling of errflag condition during substitutions
...
Affects for/select word lists, function definition name position, and
anonymous function argument lists.
2014-04-20 10:27:15 -07:00
Andrew Waldron
8189e12312
32552 (updated by 32560): fix segfault when using process substitution in anonymous function argument list
...
Also disallow process substitution in function name position.
2014-04-18 07:30:36 -07:00
Peter Stephenson
aede5c52bf
32176: plug additional deadlock-inducing pipe descriptor leaks
2013-12-21 17:41:21 -08:00
Barton E. Schaefer
9887fc3d7b
32171: close pipe descriptor in parent when left side is a shell construct to
...
prevent deadlock
Also clean up ChangeLog entry that attributed 32119 to 32114
2013-12-20 23:03:46 -08:00
Daniel Shahaf
b28a6365f6
32091: WARN_CREATE_GLOBAL false positive.
...
In cases like () { foo=bar =true; }
2013-12-06 09:28:42 +00:00
Barton E. Schaefer
c98cbe25d2
31919: fix deadlock when a shell builtin with a multio redirection is used 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.
2013-10-27 15:42:00 -07:00
Barton E. Schaefer
c39d2f8e49
31912: in closemn(), distinguish closing for >&- from closing for a real redirect
...
Fixes knock-on multios bug introduced by workers/20666 way back in 2005.
2013-10-27 11:27:41 -07:00
Peter Stephenson
9a044f1a6a
Use VERBOSE option in execstring()
2013-10-19 23:08:24 +01:00
Peter Stephenson
8879c46a48
31846: fix NOEXEC option in execsimple() optimisation
2013-10-18 23:42:07 +01:00
Bart Schaefer
978b5bcc8d
31832: make execrestore() more signal-safe.
2013-10-17 07:35:05 -07:00
Peter Stephenson
68a9bab11d
31809: Make whitespace clear in trace output for patterns.
2013-10-10 17:12:50 +01:00
Peter Stephenson
709dbbbda8
31549: Fix third problem with file descriptor management.
...
Replace ad-hoc subsh_close file descriptor for pipe management with the new
job-based addfilelist() mechanism.
2013-07-21 18:23:04 +01:00
Peter Stephenson
39ab9952e8
31545: Use of FD_CLOEXEC to remove possibility of fd reuse.
...
File descriptors of mmap'd dump files are closed if and only if
an exec is performed.
2013-07-20 23:23:18 +01:00
Peter Stephenson
3c5732223f
31528: use job table to record file descriptors associated with process subst
2013-07-17 21:33:16 +01:00
Peter Stephenson
fdf2867e5f
31444: Basic code for enable/disable -p
2013-06-13 18:38:33 +01:00
Frank Terbeck
2405b0ac0c
31376: Make sure every execve() is prefixed by winch_unblock()
...
This was suggested by Bart Schaefer in 31375.
2013-05-05 20:33:36 +02:00
Frank Terbeck
9604bc9a9f
Revert "31372: Do not block SIGWINCH for child processes"
...
This reverts commit f8ab02ad5f
.
As Bart suggested in 31375.
2013-05-05 20:33:07 +02:00
Bart Schaefer
f8ab02ad5f
31372: Do not block SIGWINCH for child processes
...
Something similar may also be needed in the zpty and clone modules.
2013-05-05 11:27:39 +02:00
Peter Stephenson
fb3ad98f71
31141: Tighten NO_CLOBBER restrictions on {fd} syntax
...
to apply only if $fd is exactly an fd and nothing else.
2013-03-10 21:45:04 +00:00
Peter Stephenson
1869eeb393
30876: fix obscure failures to propagate non-zero status
...
from optimised simple commands within lists
2012-12-13 10:36:59 +00:00
Peter Stephenson
4b86cc48f7
30726: make shell options passed to emulate stick along with the emulation
2012-10-11 20:14:01 +00:00
Peter Stephenson
ad92cb3203
30724: shell code optimisd to use execsimple() doesn't have a valid thisjob
2012-10-11 16:36:14 +00:00
Peter Stephenson
4e2cdd7956
30722: fix some cases where emulations or options were not propagated properly
...
from the emulate command
2012-10-07 19:46:46 +00:00
Peter Stephenson
6f3ff6b653
30633: "functions -T" only traces marked function, not called functions
2012-08-21 18:03:01 +00:00
Peter Stephenson
86f8e8de69
30307 plus tweak suggsted by Wayne: use %lld for zlong when long long
2012-03-05 10:06:28 +00:00
Bart Schaefer
8c37e6f077
30272 (tweaked): most failures of fork() cause non-interactive shells to
...
exit nonzero; bad options to "exec" cause exit under POSIX_BUILTINS.
2012-03-01 03:33:18 +00:00
Peter Stephenson
53f893d062
30181, plus rename of PF_* flags to PREFORK_*:
...
Pass sh-wordsplitting instructions to paramsubst() using flags,
avoiding side effects of explicitly setting and unsetting the
SHWORDSPLIT option.
2012-02-12 20:27:48 +00:00
Frank Terbeck
c8381cda78
30111: Src/exec.c: Fix segfaults with exec options.
2012-01-16 22:14:11 +00:00
Peter Stephenson
93139f39f1
30000 plus some comments: Better POSIXJOBs behaviour.
...
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
2011-12-12 19:25:02 +00:00
Peter Stephenson
faa02346a8
29844, 29845: remove bogus
...
error on closing fd's 0 to 9; update test
2011-10-26 18:48:13 +00:00
Peter Stephenson
ca7269e82d
users/16289: don't delete temporary files on disown.
...
Document.
2011-08-28 16:38:28 +00:00
Peter Stephenson
85b00bb0f7
29703: crash when failing to parse process substitutions
2011-08-17 20:26:05 +00:00
Bart Schaefer
516ea294b8
29677: Do not allow external processes in a pipeline to become suspended
...
when the end of the pipe is controlled by a builtin in the current shell
which cannot itself become suspended.
2011-08-14 18:34:27 +00:00
Bart Schaefer
92ee9324a9
29654: "wait" should resume stopped jobs identified by process ID as well
...
as by job number; temporary (?) workaround for pipelines getting lost if
TSTP is delivered when a shell builtin is the tail of the pipe.
2011-08-10 03:21:15 +00:00
Peter Stephenson
45913f43e5
29561: Allow closing of fd's not recorded by the shell
2011-07-25 10:20:09 +00:00
Peter Stephenson
a8657c4b40
29555: fix problem using open fd beyond max_zsh_fd
2011-07-19 09:26:56 +00:00
Peter Stephenson
e1680e6840
29503: Missing popheap() on failed autoload
2011-06-23 19:29:24 +00:00
Peter Stephenson
6062529d3f
29492: add argument handling to anonymous functions
2011-06-19 20:12:00 +00:00
Bart Schaefer
e39dfaeb95
29367, 29368: avoid redirecting the xtrace of simple commands along with
...
their standard error.
2011-05-24 15:49:03 +00:00
Mikael Magnusson
72cb7cfc6f
29307, 29308 + replies: Fix some doubled words in docs and comments.
2011-05-19 16:10:46 +00:00
Peter Stephenson
d89361739a
29165: use term.h globally if needed at all.
2011-05-09 09:49:08 +00:00