Could you please help me with an opposite issue? I need to close a file, but I am only given a filename (I presume I need to convert it to a file descriptor). Is it possible at all, and if so – in which way? Thanks.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using POSIX standard APIs? No.
On some linux systems, you might be able to figure it out via /proc/PID/fd.