Consider i have opened the file as hell.txt
with the open()
function.
fd=open("hell.txt",O_RDONLY);
then, consider it will return the descriptor as 4
. and hi.txt
already occupy the descriptor 3
, so i want to connect the hell.txt
file with 3
without using dup2
or fcntl()
function.
is it possible to change without using that two functions?