From 76f1877e3bf3e6afcd6c1fa446dd3cd28294b9e9 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Fri, 25 Jul 2003 21:52:58 +0000 Subject: [PATCH] scontrol now exits on "-V" (version) command line option for consistency with other slurm commands. --- src/scontrol/scontrol.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scontrol/scontrol.c b/src/scontrol/scontrol.c index 433c25df54d..7428a095b80 100644 --- a/src/scontrol/scontrol.c +++ b/src/scontrol/scontrol.c @@ -106,11 +106,11 @@ main (int argc, char *argv[]) int option_index; static struct option long_options[] = { - {"help", 0, 0, 'h'}, + {"help", 0, 0, 'h'}, {"oneliner", 0, 0, 'o'}, - {"quiet", 0, 0, 'q'}, - {"verbose", 0, 0, 'v'}, - {"version", 0, 0, 'V'}, + {"quiet", 0, 0, 'q'}, + {"verbose", 0, 0, 'v'}, + {"version", 0, 0, 'V'}, }; command_name = argv[0]; @@ -133,7 +133,7 @@ main (int argc, char *argv[]) quiet_flag = -1; else if (opt_char == (int)'V') { _print_version(); - return 0; + exit(0); } else { fprintf(stderr, "getopt error, returned %c", opt_char); -- GitLab