w****a 发帖数: 155 | 1 The following is a function to handle "pipes", the problem is that it works
fine for the case like "yes + | head -15". But it doesn't work for the case
like
" yes + |head -15|cat -n" The program just stuck at the line( I marked in the
program), Could you help me find what cause the problem? Many thanks.
void executePipe(){
int* pids;
int** pipes;
int pipeCount=0;
char** command;
int nextCommand;
if(badPipe()){ // check for bad pipe
cout << "Invalid Command" << endl;
return; |
|