Пожалуйста, посмотрите, что здесь может быть неправильно...
Без селекта из двух пайпов данные читаются... с селектом - ни в какую...
//----------------------
//процесс-ребенок
if(fork()==0)
{
dup2(pipe1[1], STDOUT_FILENO);
//endless while
while(1)
{
printf()...
........что-то выводим...
}
}
//----------------------
//descriptors_set
fd_set rdset;
timeval tv = { 0, 1 }; //0.1 sec
while(1)
{
//set to rdset both pipes reading ends
FD_ZERO(&rdset);
FD_SET(pipe1[0],&rdset);
FD_SET(pipe2[0],&rdset);
//waiting for one of descriptors read readiness
res = select(2, &rdset, NULL, NULL, &tv);
if(res<=0)
{
printf("data was not received\n");
}
if(res>0)
{
printf("select returned the result\n");
if(FD_ISSET(pipe1[0], &rdset))
{
bzero(buff, 2000);
read(pipe1[0], buff, 2000);
}
if(FD_ISSET(pipe2[0], &rdset))
{
read(pipe2[0], command_buf, 100);
}
}
}//end of while