Can anybody answer this.....

Hi i am trying the threads concept in unix environment using C...

but i am getting error of "wait_fd: Couldn't find procinfo for fd 24"...

what does this error mean.....

help me in solving this issue...

Thanks in advance
shivamasam

where do you see this?

are you trying to reference a thread that no longer exists?

i am seeing this error at runtime.... i have cretaed a thread which monitors a particular directory for any new files,, if any file is added... this thread is needs to be active and start further processing of picking that file and so on....

but when i start the application... for the first time it is picking all the existing files in dirctory.... but during runtime if i add a new file to the dir it is giving a error of "wait_fd Couldn't find proc info for fd 24".....

why is this happpening?
and i would like to know how to monitor the status of a threrad?

Thanks
shivamasam

  1. So how does your thread monitor for new files in a directory?

  2. Surely once it finds something it just the calls some routine to handle the new file, why do you need to "monitor the status of the thread"?

  3. At the moment I have very little idea what you actually have so I can't make any sensible problem determination.

The standard way to use threads is to

  1. let threads run at their own speed

  2. share information through common memory

  3. synchronise operations and notify events with conditions

  4. guard access with mutexes

  5. cleanup with joins and pthread_cleanup_push/pop