Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

wvstreamlistex.cc

Go to the documentation of this file.
00001 #include <wvpipe.h>
00002 
00003 int X = -1;
00004 // int X = 0;
00005 // int X = 1000;
00006 
00007 int main()
00008 {
00009     const char *argv1[] = { "sh", "-c", 
00010                                 "while :; do echo foo; sleep 3; done" };
00011     const char *argv2[] = { "sh", "-c", 
00012                                 "while :; do echo snorkle; sleep 1; done" };
00013 
00014     WvPipe stream1(argv1[0], argv1, false, true, false);
00015     WvPipe stream2(argv2[0], argv2, false, true, false);
00016     stream1.autoforward(*wvcon);
00017     stream2.autoforward(*wvcon);
00018     
00019     while (stream1.isok() || stream2.isok())
00020     {
00021         if (stream1.select(X))
00022             stream1.callback();
00023         if (stream2.select(X))
00024             stream2.callback();
00025     }
00026 }

Generated on Sat Aug 24 23:07:57 2002 for WvStreams by doxygen1.2.15