summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2019-02-25 12:49:20 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-03-28 21:18:03 +0800
commite7a5030483e039971aad59db3fc238c3051bd565 (patch)
treea54464c0c34cc395fc7a43b150c5b437096afa12 /src
parentredir: Handle nested exec within REALLY_CLOSED redirection (diff)
downloaddash-e7a5030483e039971aad59db3fc238c3051bd565.tar.gz
dash-e7a5030483e039971aad59db3fc238c3051bd565.zip
options: Do not set commandname in procargs
We set commandname in procargs when we don't have to.  This results
in a duplicated output of arg0 when an error occurs.

Reported-by: Olivier Duclos <odc@fastmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'src')
-rw-r--r--src/options.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c
index 6f381e6..a46c23b 100644
--- a/src/options.c
+++ b/src/options.c
@@ -159,7 +159,6 @@ procargs(int argc, char **argv)
 		setinputfile(*xargv, 0);
 setarg0:
 		arg0 = *xargv++;
-		commandname = arg0;
 	}
 
 	shellparam.p = xargv;