Hi ! Problem statement ------------------- Creating a directory watch thread. Process A writes a text file in a directory. Process B has to keep watching the directory, whenever a file is written on it. Process B reads the files and dumps the output on the screen, and deletes the file.
Preconditions ------------- Process A is unaware of Process B and vice-versa. Target Platform ---------------- C / C++ on Red Hat Linux I am aware of Pthreads (and have written simple programs using it), but don't know how to get the details of the directory (linux api), so that I can look at the data structure and know that a file has been copied in the directory. So that I can keep a watch thread (a pthread implementation) over it, and as soon as a file is copied the directory state change is reflected to me. Please help me proceed. Regards, Knowledge Seeker.
