On BSD based operating systems the optreset variable should be used to reset the internal getopt state. Setting optind to zero is a GNU extension.
On BSD based operating systems the optreset variable should be used to reset the internal getopt state. Setting optind to zero is a GNU extension.