diff --git a/common/tool_cmd.py b/common/tool_cmd.py index 835bce794d614264e0d93e373f2f9feda1133f3b..e4a9224929380c17f680c55bc74221a786cd6070 100644 --- a/common/tool_cmd.py +++ b/common/tool_cmd.py @@ -40,6 +40,12 @@ class ToolCmd: except ValueError: raise argparse.ArgumentTypeError("must be an integer") + if ival <= 0: + raise argparse.ArgumentTypeError("must be positive and nonzero") + + if not Command.check_pid_exist(ival, False): + raise argparse.ArgumentTypeError("should set to an existed process id") + return ival def args_help(self):