On Tue, Jan 03, 2023 at 01:26:19PM +0100, наб wrote: > > > However, I don't think we need to pass the flags to the action > > function since none of them care about whether it's unset. We > > just need to pass a pointer to an empty string rather than some > > bogus pointer. > This, unsurprisingly, produces the same error, because getoptsreset() > needs a valid number for OPTIND: > $ src/dash -c 'unset OPTIND' > src/dash: 1: unset: Illegal number: You get the same result with OPTIND="" so I don't see the issue. Am I missing something with respect to POSIX? Thanks, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt