18 int main(
int argc,
char* argv[])
28 JParser<> zap(
"Example for testing inter-process communication.");
36 catch(
const exception &error) {
37 FATAL(error.what() << endl);
46 JProcess process(command);
50 istream in(process.getInputStreamBuffer());
52 for (
string buffer;
getline(in, buffer); ) {
53 cout << buffer << endl;
58 ostream out(process.getOutputStreamBuffer());
59 istream in (process.getInputStreamBuffer());
61 for (
string buffer;
getline(cin, buffer) && buffer !=
""; ) {
63 out << buffer << endl;
68 reverse(buffer.begin(), buffer.end());
71 cout << buffer << endl;
75 catch(
const JException& error) {
76 cerr << error.what() << endl;