Commit 8bc688b6 authored by Samuel Thibault's avatar Samuel Thibault

Reset optind to 1 before parsing options

Normally the system is already doing this for us. In the MPI simgrid
execution case, however, depending on the enabled optimizations for memory,
libc may not be privatized, to save the memory that would be needed for its
duplication, and to avoid the potential headaches brought by several libcs
running in the same process. The first process would then inrease optind,
and other processes would start with optind already increased.
parent 69e80e93
......@@ -583,6 +583,7 @@ parse_arguments(int *_argc, char ***_argv, int *iparam, int *start, int *stop, i
int argc = *_argc;
char **argv = *_argv;
optind = 1;
do {
opt = -1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment