Original Post
I am writing a program where i dup2 the STDIN (0) with my file descriptor number, then i do the same for the STDOUT (1). So when i write i am actually writing to the stdout. my problem is i am having trouble reading the data from the stdin. will a simple scanf do the trick or will i need to use a system call like fgets to get the data????