|
Bugzilla – Full Text Bug Listing |
| Summary: | CommandLine based programs should exit with non-zero return if bad parameters are given | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Component: | core | Assignee: | ns-bugs <ns-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | mathieu.lacage |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
the problem is that this will return -1 even if the user calls --PrintHelp (In reply to comment #1) > the problem is that this will return -1 even if the user calls --PrintHelp OK, I need to describe the problem better. Re-titling. what I meant is that --PrintHelp is not a bad parameter. changeset 6aa43c812fec |
When a ns-3 program is run with bad command-line parameters, it is exiting with zero exit code, which is obviously wrong. Minor but annoying problem; easy fix: void CommandLine::PrintHelp (void) const { [...] - exit (0); - exit (1); }