src/relpipe-in-jack.cpp
branchv_0
changeset 2 e5f0d3f92eb4
parent 1 001b956610ca
child 8 8ef1980db907
equal deleted inserted replaced
1:001b956610ca 2:e5f0d3f92eb4
    43 
    43 
    44 	try {
    44 	try {
    45 		signal(SIGHUP, finish);
    45 		signal(SIGHUP, finish);
    46 		signal(SIGINT, finish);
    46 		signal(SIGINT, finish);
    47 		jackCommand.reset(new JackCommand());
    47 		jackCommand.reset(new JackCommand());
    48 		jackCommand->processJackStream(cout);
    48 		std::shared_ptr<RelationalWriter> writer(Factory::create(std::cout));
       
    49 		jackCommand->processJackStream(writer, std::bind(fflush, stdout)); // std::bind(fflush, XXX) Factory::create(XXX) must be the same stream XXX
    49 		resultCode = CLI::EXIT_CODE_SUCCESS;
    50 		resultCode = CLI::EXIT_CODE_SUCCESS;
    50 	} catch (JackException e) {
    51 	} catch (JackException e) {
    51 		fwprintf(stderr, L"Caught JACK exception: %ls\n", e.getMessge().c_str());
    52 		fwprintf(stderr, L"Caught JACK exception: %ls\n", e.getMessge().c_str());
    52 		fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
    53 		fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
    53 		resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR;
    54 		resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR;