def start(ctrl):
    """Start the Helper controller either in the foreground or as a daemon
    process.

    :param ctrl helper.Controller: The controller class handle to create and run

    """
    args = parser.parse()
    obj = ctrl(args, platform.operating_system())
    if args.foreground:
        try:
            obj.start()
        except __HOLE__:
            obj.stop()
    else:
        try:
            with platform.Daemon(obj) as daemon:
                daemon.start()
        except (OSError, ValueError) as error:
            sys.stderr.write('\nError starting %s: %s\n\n' %
                             (sys.argv[0], error))
            sys.exit(1)
dataset/ETHPy150Open gmr/helper/helper/__init__.py/start