Changeset 13796 for trunk/FACT++/src


Ignore:
Timestamp:
05/20/12 17:34:52 (12 years ago)
Author:
tbretz
Message:
Propagate the return code to the program exit.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Main.h

    r13749 r13796  
    7171    }
    7272
    73     void Thread(MainImp *io_service, bool dummy)
     73    void Thread(MainImp *io_service, bool dummy, int &rc)
    7474    {
    7575        // This is necessary so that the StateMachien Thread can signal the
    7676        // Readline to exit
    77         io_service->Run(dummy);
     77        rc = io_service->Run(dummy);
    7878        Readline::Stop();
    7979    }
     
    189189
    190190        //    boost::thread t(boost::bind(&AutoScheduler<S>::Run, &io_service));
    191         thread t(bind(Main::Thread, &io_service, dummy));
     191        int ret = 0;
     192        thread t(bind(Main::Thread, &io_service, dummy, ref(ret)));
    192193
    193194        const vector<string> v1 = conf.Vec<string>("cmd");
     
    211212        t.join();
    212213
    213         return 0;
     214        return ret;
    214215    }
    215216}
Note: See TracChangeset for help on using the changeset viewer.