26.02.2024 18:43, Michael Tokarev wrote:
The reason is most likely the argv/argc handling (lack of optind reset). In the later change it is fixed but at that stage it's broken.
Nope. GNU getopt_long really needs resetting the state. Or else it keeps return_in_order/permute/etc setting from the previous init call. So this patch needs tweaking, - the reset must be kept, and argv[0] init should be done a bit differently. An easy change. /mjt