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
1:Why the creators of Windows and Linux systems chose different ways to support Unicode?
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?
2:PHP: Can pcntl_alarm() and socket_select() peacefully exist in the same thread?
readdiris not thread-safe, as it keeps an internal static storage for the context. Use
readdir_rin this case (the _r means reentrant). The another functions in
dirent.hare reentrant by default..