Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | unposted (branch fork_early): Fork early for pipelines. | Peter Stephenson | 2018-05-01 | 1 | -82/+63 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If executing a command not at the end of a pipeline, and not optimised in the calling code, we can fork before "prefork" substitutions, at the same point as for background commands. Move fork before our preliminary scan of arguments to find a command: in the cases of early fork we don't need this information before forking. Ensure we _exit if forked in execcmd_exec(). Rationalise use of forks and pipes. Ensure we _exit instead of returning from execcmd_exec() if we have forked. Before the optimisation code after the fork always ran to the check at the end, but that code is overkill for the logic between the early fork and the existing one. Remove old workaround to fork in caller of execcmd for current shell constructs as no longer needed with early fork below. Close input of newly created pipe on fork (destined for RHS of pipe which we never execute): this replaces a workaround from zsh-workers/32171, commit 9887fc3d7b. Set last1 on early fork as needed by some instances of shell constructs on LHS of pipeline to know they are exiting. | ||||
* | 47201: fix 42355 for multiple backslashes | Ricardo Giorni | 2018-04-29 | 1 | -6/+6 |
| | |||||
* | unposted: Correct process substitution buffer size in the PATH_DEV_FD codepath. | Daniel Shahaf | 2018-04-25 | 1 | -1/+1 |
| | |||||
* | 42708: fix for process substitution. | Peter Stephenson | 2018-04-24 | 3 | -10/+18 |
| | | | | | | | | | Don't close associated file descriptors in the closem() tidy up function as they should remain visible to external processes. Override if about to exit. Unit test for the failing case: note this relies on the existence of /proc/self/fd or equivalent. | ||||
* | 42705: Another safety fix for pgrp reclaiming. | Peter Stephenson | 2018-04-23 | 1 | -1/+2 |
| | | | | | | Only do this if killpg(dead_pid, 0) returns -1, indicating the pgprp doesn't exist any more, else there is a race if other proceses have started using it. | ||||
* | Allow short loops with "while" | Peter Stephenson | 2018-04-23 | 1 | -1/+3 |
| | |||||
* | 42684 (with extra comments): Fork early if in bg. | Peter Stephenson | 2018-04-20 | 1 | -95/+135 |
| | | | | | | | In execcmd the case of running the last command in a pipeline asynchronously for the purpose of & and &! is easy to work out, and we can avoid side effects and unnecessary execution time in the parent shell by forking earlier. | ||||
* | 42686: Fix previous pgrp patch. | Peter Stephenson | 2018-04-19 | 1 | -1/+2 |
| | | | | | We shouldn't do any fix ups unless the process has actually exited. | ||||
* | 42630: Improve process group handling in pipelines. | Peter Stephenson | 2018-04-17 | 2 | -1/+29 |
| | | | | | | | | | If process group leader exits, allow a newly forked process to become process leader. If a foreground job, reattach the shell to the terminal until that happens. Unblock signals when reading output for command subsitution so that we can do this reattaching immediately. | ||||
* | 42650: fix 42156 for zero-sized terminals | Barton E. Schaefer | 2018-04-15 | 1 | -5/+7 |
| | | | | Also fix harmless no-op typo from hand-applying 42636 for previous commit. | ||||
* | 42636: fix GLOB_DOTS for !(RM_STAR_SILENT) | Barton E. Schaefer | 2018-04-15 | 1 | -4/+5 |
| | | | | Also fix paste-o in older log entry | ||||
* | 42624 (plus test): avoid freeing memory that's still needed | Oliver Kiddle | 2018-04-12 | 1 | -5/+9 |
| | | | | | This was occurring in a multiple function definition where a function name is duplicated. | ||||
* | 42605: properly free the vi registers hash | Oliver Kiddle | 2018-04-07 | 3 | -4/+16 |
| | |||||
* | 42601: tidy up code for set -A/+A to not increment a NULL pointer and to be ↵ | Oliver Kiddle | 2018-04-07 | 1 | -6/+4 |
| | | | | more efficient | ||||
* | 42607, CVE-2018-1100: check bounds on buffer in mail checking | Oliver Kiddle | 2018-04-07 | 1 | -3/+5 |
| | |||||
* | 42600: error paths for _values leaked the exclusion list array | Oliver Kiddle | 2018-04-07 | 1 | -0/+4 |
| | |||||
* | 42597: plug memory leak found by coverity | Oliver Kiddle | 2018-04-07 | 1 | -1/+3 |
| | |||||
* | 42595: remove dead code flagged by coverity | Oliver Kiddle | 2018-04-07 | 1 | -3/+1 |
| | |||||
* | 42575: fix to not complete options in the argument to another option | Oliver Kiddle | 2018-04-05 | 1 | -1/+1 |
| | |||||
* | 42581(?): Fix ZLE inline history expansion. | Peter Stephenson | 2018-04-04 | 2 | -3/+21 |
| | | | | | | | Seen with magic-space. If there's a parse error in command subtitution we need to complete reading history to ensure the command line buffer is finished. | ||||
* | 42560: silence sign-compare compiler warnings | Oliver Kiddle | 2018-03-30 | 1 | -3/+3 |
| | |||||
* | 42539: prevent overflow of PATH_MAX-sized buffer in spelling correction | Oliver Kiddle | 2018-03-28 | 1 | -5/+9 |
| | |||||
* | 42538: Temporarily set umask for here document. | Martijn Dekker | 2018-03-27 | 1 | -0/+4 |
| | | | | Done while signals are queued. | ||||
* | 42480: optimize $#var for single-byte character sets | Barton E. Schaefer | 2018-03-25 | 1 | -1/+1 |
| | |||||
* | 42519, CVE-2018-1083: check bounds on PATH_MAX-sized buffer used for file ↵ | Oliver Kiddle | 2018-03-24 | 1 | -0/+6 |
| | | | | completion candidates | ||||
* | 42518, CVE-2018-1071: check bounds when copying path in hashcmd() | Oliver Kiddle | 2018-03-24 | 2 | -4/+4 |
| | |||||
* | unposted: add 'static' to a file-local variable | Jun-ichi Takimoto | 2018-03-24 | 1 | -1/+1 |
| | |||||
* | 42501: avoid out of bound pointer (as 42487) | Jun-ichi Takimoto | 2018-03-24 | 3 | -8/+7 |
| | |||||
* | 42487: Fix pointer problems in compctl. | Peter Stephenson | 2018-03-21 | 1 | -32/+32 |
| | | | | | Pointing off the front of a string caused warnings with gcc 7.3.0 and is somewhat murky C anyway. | ||||
* | 42469: necessary repairs to 42465 found by "make check" | Stephane Chazelas | 2018-03-18 | 2 | -4/+3 |
| | |||||
* | 42465: Pass up error status from readoutput(). | Stephane Chazelas | 2018-03-15 | 2 | -4/+15 |
| | | | | This improves the consistency of error reporting from $(...) constructs. | ||||
* | 42453: Fix race in look up of status for wait. | Peter Stephenson | 2018-03-12 | 1 | -2/+5 |
| | | | | | | Background jobs that had just exited could still be in the table when the process had already finished and the status was recorded, causing the wrong status to be reported. | ||||
* | 42365: Use .zwc file if timestamp identical to source. | Martijn Dekker | 2018-03-05 | 1 | -4/+4 |
| | | | | This can happen if the files are bundled together. | ||||
* | 42411: Assume current C librarires handle free(NULL) | Taylor West | 2018-03-04 | 1 | -4/+2 |
| | |||||
* | 23180: Fix expand-or-complete with ~[...]. | Peter Stephenson | 2018-02-26 | 1 | -0/+9 |
| | | | | The square brackets shouldn't be treated as wildcards. | ||||
* | 42401: workaround for gcc -foptimize-strlen oddit. | Peter Stephenson | 2018-02-26 | 1 | -1/+7 |
| | | | | Use realloc(NULL, ...) instead of malloc in zsh-mem calloc(). | ||||
* | 42362: protect REPORTTIME logic from bad status | Peter Stephenson | 2018-02-17 | 1 | -0/+3 |
| | |||||
* | 42355: Fix use of backslashes on here doc input. | Peter Stephenson | 2018-02-12 | 1 | -1/+10 |
| | | | | | Handling of white space in particular was confusing and inconsistent with other shells. | ||||
* | 42332: Special case unsigned printf formats. | Peter Stephenson | 2018-01-31 | 2 | -1/+65 |
| | | | | | For constants we can avoid a conversion to signed by examining the expression before passing to math eval. | ||||
* | 42322 (tweaked): Fix interactive_comments history with just a coment. | Peter Stephenson | 2018-01-24 | 2 | -1/+13 |
| | | | | | Don't discard the line from the history merely because it produced no synactic words. | ||||
* | 42313: avoid null-pointer deref when using ${(PA)...} on an empty array result | Joey Pabalinas | 2018-01-23 | 1 | -1/+1 |
| | |||||
* | 42243: Free stuff properly in zsh/pcre module | Mikael Magnusson | 2018-01-20 | 1 | -1/+34 |
| | |||||
* | 42285: off by one fix in multiple prompts | Warepire | 2018-01-16 | 1 | -1/+1 |
| | |||||
* | 42136: empty string check in %~ / %C prompt expansions | Barton E. Schaefer | 2018-01-14 | 1 | -1/+1 |
| | |||||
* | 42043: ZSH_DEBUG_CMD should not WARN_CREATE_GLOBAL | Barton E. Schaefer | 2018-01-14 | 1 | -1/+3 |
| | |||||
* | 42245: Abort last word on interactve comment. | Peter Stephenson | 2018-01-08 | 3 | -1/+24 |
| | | | | Last recorded word should be the previous one. | ||||
* | 42164: fix digits in format escapes in completion listings | dana | 2018-01-04 | 1 | -3/+3 |
| | |||||
* | Avoid crash copying empty hash table. | Stephane Chazelas | 2018-01-04 | 1 | -4/+7 |
| | | | | Visible with typeset -p. | ||||
* | 42188: Close flock descriptor in failure cases | Sebastian Gniazdowski | 2018-01-04 | 1 | -3/+11 |
| | |||||
* | 42156: new CHECK_RUNNING_JOBS option demanded by bash groupies | Peter Stephenson | 2017-12-22 | 4 | -3/+6 |
| | | | | | | | Also new job options. Also suppress debug error if rows or columns are reported as zero as this is normal without a physical terminal. |