I am writing a linux module which exchanges data with a user process. Perhaps the system may crash if module try to send data to a terminated user process. For avoiding crash we can use kill() function for checking availability of pid. But it will not work every time because user process may be closed after successful return of kill() function. I wanted to know that "Is there any signal and signal handling mechanism exist which can handle this situation?". If yes, then please explain this.
Thanks..