How to get event when device creation is completed by mknod on linux Ubuntu 8.04?
Hi,
I need to use a device (/dev/ttyS5) which is created by a process which is launched by my program.
However, after launching the process, it takes some time for /dev/ttyS5 device to come up.
hence i need to use sleep() for for 3~4 seconds after launching the process and hope that device becomes ready by that time.
is there any way to get some kind or signal or event by which i can know if device is ready? sleep() is really bad way to handle this situation.
regards,
Anks
PS: Child process that I am launching is not written by me. hence its not possible for me to modify its source code.
|