in reply to Opendir, readdir & closedir.
That means it's behaving exactly as documented: the grep called it in list context, it returned a list of all files, and now it will be returning a NULL list until you do an opendir again.
It's the same thing as trying to read from a file where you've already read all the contents.
|
|---|