fopen does not return

后端 未结 4 888
感情败类
感情败类 2021-02-15 02:49

I used \'fopen\' in a C program to open a file in readonly mode (r). But in my case I observed that fopen call does not return. It does not return NULL or valid pointer - execut

4条回答
  •  清酒与你
    2021-02-15 03:19

    I notice you don't close the file if you open it successfully.

    Is it possible you that you have run it before and killed it, and now you have a process out there which has the file open, and locked?

    If so, then maybe fopen is waiting for the lock to be released.

提交回复
热议问题