175
176
/* Poll input from user in non-blocking mode */
180
userinputready = select( STDIN_FILENO+1, set, NULL, NULL, time_val );
181
userinputready = select( pipefd_i2f[0]+1, set, NULL, NULL, time_val );
182
183
if ( userinputready == -1 ) {
183
184
printf( "Error reading user input.\n" );
184
185
} else if ( userinputready > 0 ) {
185
186
/* There are some data from the user. Store it in buffer */
186
187
strncpy( userinputaux, zerochar, BUF_SIZE );
188
189
strcat( userinputbuf, userinputaux );
189
190
userinputbuf[strlen( userinputbuf ) + nread] = '\0';