Messages in this thread | | | Subject | Re: verifying a task_struct | From | Andreas Schwab <> | Date | 12 Dec 1997 12:11:00 +0100 |
| |
tyson <tyson@rwii.com> writes:
|> How can I verify that a struct task_stuct pointer is still valid before |> using it? The pointer is copied from current as part of an ioctl() but |> I have found that if the process forks after the ioctl, the parent |> exits and then the child continues to use the open file descriptor that |> problems can result. Specifically, the driver ends up sending a signal |> to a process that no longer exists and the system becomes unstable.
I think you should save the pid, not the task_struct pointer, and then use the pid to send the signal.
-- Andreas Schwab "And now for something schwab@issan.informatik.uni-dortmund.de completely different" schwab@gnu.org
| |