I am trying to make a rw version of popen (by returning a pair of pipes), but I am having trouble dup2'ing stdin to an end of a pipe.
How do I turn it into a file descriptor then? and what exactly is it?Code:
test.c:18: warning: passing argument 2 of ‘dup2’ makes integer from pointer without a cast
test.c:18: error: incompatible type for argument 2 of ‘dup2’