Keith Thompson kst@cts.com
Ken Pizzini kenp@halcyon.com
Kevin Mudrick kmudrick@healthmarketscience.com
+Kim Hansen kim@i9.dk
Kirk Kelsey kirk.kelsey@0x4b.net
Kristin E Thomas kristint@us.ibm.com
Kjetil Torgrim Homme kjetilho@ifi.uio.no
#include "operand2sig.h"
#include "cloexec.h"
#include "error.h"
-#include "long-options.h"
#include "quote.h"
#define PROGRAM_NAME "timeout"
{
{"kill-after", required_argument, NULL, 'k'},
{"signal", required_argument, NULL, 's'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
initialize_exit_failure (EXIT_CANCELED);
atexit (close_stdout);
- parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE_NAME, Version,
- usage, AUTHORS, (char const *) NULL);
-
while ((c = getopt_long (argc, argv, "+k:s:", long_options, NULL)) != -1)
{
switch (c)
case 'k':
kill_after = parse_duration (optarg);
break;
+
case 's':
term_signal = operand2sig (optarg, signame);
if (term_signal == -1)
usage (EXIT_CANCELED);
break;
+
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (EXIT_CANCELED);
break;