diff options
| author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-06-29 19:01:31 +0100 |
|---|---|---|
| committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-06-29 19:01:31 +0100 |
| commit | 7708849b2186ce60e80e0dbc9ade89ad7404499e (patch) | |
| tree | 2b5f1d4025e63fd5e8c339930811c564130c52ae /Src/exec.c | |
| parent | 35660: prompt_adam1_setup: avoid perl, fix help (diff) | |
| download | zsh-7708849b2186ce60e80e0dbc9ade89ad7404499e.tar zsh-7708849b2186ce60e80e0dbc9ade89ad7404499e.tar.gz zsh-7708849b2186ce60e80e0dbc9ade89ad7404499e.tar.bz2 zsh-7708849b2186ce60e80e0dbc9ade89ad7404499e.tar.lz zsh-7708849b2186ce60e80e0dbc9ade89ad7404499e.tar.xz zsh-7708849b2186ce60e80e0dbc9ade89ad7404499e.tar.zst zsh-7708849b2186ce60e80e0dbc9ade89ad7404499e.zip | |
35655: APPEND_CREATE option for POSIX copmatible NO_CLOBBER
Diffstat (limited to 'Src/exec.c')
| -rw-r--r-- | Src/exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c index 39d132647..960601f29 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3315,7 +3315,8 @@ execcmd(Estate state, int input, int output, int how, int last1) fil = -1; else if (IS_APPEND_REDIR(fn->type)) fil = open(unmeta(fn->name), - (unset(CLOBBER) && !IS_CLOBBER_REDIR(fn->type)) ? + ((unset(CLOBBER) && unset(APPENDCREATE)) && + !IS_CLOBBER_REDIR(fn->type)) ? O_WRONLY | O_APPEND | O_NOCTTY : O_WRONLY | O_APPEND | O_CREAT | O_NOCTTY, 0666); else |
