diff options
| author | Jilles Tjoelker <jilles@FreeBSD.org> | 2017-03-04 22:58:34 +0000 |
|---|---|---|
| committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2017-03-04 22:58:34 +0000 |
| commit | 586fd248570cdd61c88871a235864ee9fa7aef32 (patch) | |
| tree | b89086c8bb0e479d2a3ed9bf98705a1f15275133 /bin/sh/expand.c | |
| parent | 9c4241c3d7a90548df819a624cbdcf8e5235ca82 (diff) | |
Notes
Diffstat (limited to 'bin/sh/expand.c')
| -rw-r--r-- | bin/sh/expand.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c index be0f53ed051d9..832b51f12f53a 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -460,7 +460,6 @@ expbackq(union node *cmd, int quoted, int flag, struct worddest *dst) p = grabstackstr(dest); evalbackcmd(cmd, &in); ungrabstackstr(p, dest); - argbackq = saveargbackq; p = in.buf; nnl = 0; @@ -514,12 +513,16 @@ expbackq(union node *cmd, int quoted, int flag, struct worddest *dst) close(in.fd); if (in.buf) ckfree(in.buf); - if (in.jp) + if (in.jp) { + p = grabstackstr(dest); exitstatus = waitforjob(in.jp, (int *)NULL); + ungrabstackstr(p, dest); + } TRACE(("expbackq: size=%td: \"%.*s\"\n", ((dest - stackblock()) - startloc), (int)((dest - stackblock()) - startloc), stackblock() + startloc)); + argbackq = saveargbackq; expdest = dest; INTON; } |
