fopen does not return

后端 未结 4 890
感情败类
感情败类 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条回答
  •  梦毁少年i
    2021-02-15 03:08

    So what? fopen is allowed to block until the file has been opened, or until it has been determined that access is denied. If you have a slow storage device, it is absolutely correct to wait until that becomes available. But that is an operating system issue then, not C's.

提交回复
热议问题