sim: run: add --argv0 option to control argv[0]
authorMike Frysinger <vapier@gentoo.org>
Mon, 15 Nov 2021 07:36:29 +0000 (02:36 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 15 Nov 2021 07:53:31 +0000 (02:53 -0500)
commit852016f92107581dbc9513196c9a74a91b5a5b6e
tree0e785165301066a263f61f38c94ee8b272239bc7
parente8f20a28b1192d746475f045d77ac84411f164df
sim: run: add --argv0 option to control argv[0]

We default argv[0] to the program we run which is a standard *NIX
convention, but sometimes we want to be able to control the argv[0]
setting independently (especially for programs that inspect argv[0]
to change their behavior or output).  Add an option to control it.
sim/common/nrun.c
sim/common/sim-base.h
sim/common/sim-options.c
sim/common/sim-utils.c