Is it always characters, or can it be data?
I'd also like to know when my program is being run directly, then it will behave differently.
A great example of the input behavior desired is demonstrated through use of nano. Here's what I'm looking for:
...where timeout(), getPipe(), and doNoPipe() are my functions.
I'd also like to know when my program is being run directly, then it will behave differently.
A great example of the input behavior desired is demonstrated through use of nano. Here's what I'm looking for:
Code:
int main(int argc, char * argv) {
int len = 0;
int buffer[] = new int[1024];
while (!timeout() && len < 1024)
len += getPipe(buffer, len, 1024-len);
if (len == 0) doNoPipe();
}