just in case -- now it can barely do anything when it goes wrong.
-/* $OpenBSD: getopt.c,v 1.8 2009/10/27 23:59:38 deraadt Exp $ */
+/* $OpenBSD: getopt.c,v 1.9 2015/10/07 06:39:16 deraadt Exp $ */
/*
* This material, written by Henry Spencer, was released by him
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <err.h>
int
main(int argc, char *argv[])
int c;
int status = 0;
+ if (tame("stdio", NULL) == -1)
+ err(1, "tame");
+
optind = 2; /* Past the program name and the option letters. */
while ((c = getopt(argc, argv, argv[1])) != -1)
switch (c) {