What does "POSIX.1-2008" mean that ftw () is deprecated, "therefore, means?

Reading man 3 ftwI noticed that "POSIX.1-2008 notes that ftw () is deprecated."
Now I'm worried and want to be a "good programmer" and maybe respect dullness ftw(). Nevertheless, I always try to understand what else I should use, which is now "relevant", and in a conversation about what will replace with ftw()what made it obsolete.

If allowed, I am particularly interested in two additional questions.

  • Can i use ftw()?
  • Is there a way to assess the risks involved?
  • What is the successor ftw()

I hope for mercy, if I am open to suggestions to improve this issue, although he is still happy to help and accepted it, because it is difficult, and I tried to compose the question.

+4
source share
1 answer

Yes, you should avoid using legacy features. For ftw()replacement nftw():

int nftw(const char *path, int (*fn)(const char *,
       const struct stat *, int, struct FTW *), int fd_limit, int flags);

From Open Group :

ftw() . ftw() , , longjmp() siglongjmp() , fn , ftw() , . , , , , fn .

nftw() ftw().

+4

All Articles