Emulate "dup2()" without using "fcntl()"
Hi All,
I need to emulate the "dup2" system call, but not using the "fcntl" system call.
If I use "dup" system call, I cannot predict the returned file descriptor, which the user specifies in the parameters of "dup2":
int dup(int oldfd)
int dup2(int oldfd, int newfd)
Do you know any other ways of doing this?
Thank you in advance.
Iuri
|