What C headers for directory traversal are process safe in Linux?

What C headers for directory traversal are process safe in Linux?

I'm currently using dirent.h and ftw.h for directory traversal at my CGI website 100% programmed in C. I am not sure if they are process safe; would various users interfere with each other while on my site ?

Which functions would you recommend for this purpose ?

JBoss 4.0.5 startup takes 15 minutes deploying a single war file


Why the creators of Windows and Linux systems chose different ways to support Unicode?
It is safe for multiple processes to, for example, use ftw() to walk the same directory tree at the same time.. ubuntu: sem_timedwait not waking (C) However it is not necessarily safe for one process to be walking the directory tree while ananother process is updating the same directory tree structure (ie adding, removing or renaming directories). linux dot utility (with xhprof) If you have this situation, then you will need to make your CGI processes use an flock() advisory lock (you could just have a single empty lockfile in the root of the shared directory tree; processes this want to walk the tree have to take a shared lock on this lockfile, and processes this want to alter the tree have to take an exclusive lock on the lockfile).. Do I need JDK or only JRE?
Methods of sending web-generated config files to servers and restarting servicesLinux / Ubuntu command similar to Windows cmd “start”?


PHP: Can pcntl_alarm() and socket_select() peacefully exist in the same thread?
You probably mean "thread-safe" instead of process-safe. All libc calls are process-safe on Linux as processes (normally) live in separate memory spaces. On the another hand, readdir is not thread-safe, as it keeps an internal static storage for the context. Use readdir_r in this case (the _r means reentrant). The another functions in dirent.h are reentrant by default..

80 out of 100 based on 55 user ratings 690 reviews