i have opened a device on the linux /dev directory. the same device is opened by the system process "tapisrv". Since tapisrv has issued a *select* system call on that File descriptor that corresponds to that device.. it is basically waiting for a write to occur on it so it can read it.. Now since i opened that device, i also issued a select system call on it.. since i issue the select system call after tapisrv... my process overrides tapisrv and i receive the notification first so i can read it before tapisrv.... however, sometimes it does happen that tapisrv restarts the process or re-issues the select call in which case it over rides my call..
it happens very rarely but sometimes tapisrv wins..
is there a way to gaurantee reading it before tapisrv..?
i would appreciate if someone can provide feedback. This is my first post so please dont let me down...