Hi guy's
I am trying to write a program
to read from the standard input.
I used the read function. The call
was
read ( STDIN_FILENO,buf,BUFFIZE);
everyting was OK. The prgram ran
succesfully and was reading from thhe
standard input.
Later i duplicated the file descripter
for the standard input ( i.e 1) using
the dup function call .
The call was
newfd = dup(1);
Nowi re wrote the read call as
read(newfd,buf,BUFFSIZE);
thhe program compiled , but for
reasons unknown to me it did not
execute at all.
can any onetell me what was thhe
problem ?
thhanks for the help in advance
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com