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