If you want to break out and restart your program from anywhere, then a try-catch construct might be better addapted than a plain while loop.

In any case, make sure your constructs are RAII (or make sure you correctly clean-up) to avoid memory leaks.

The usual alternative is to just exit the program, and have it restart from an external source. That's what 99% of command line apps do.