Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jul 2009
How the kernel see application pids...
pid = pid_nr(task_pid(current));
It does match the application and so I've been using it to track the calls to the driver.
During testing I've used a test stub to "open" the device and wait. When I terminate the application with a CTRL-C the kernel API calls the "release" function. This time the PID is different. This is essentially being used to emulate the application terminating badly. Can anyone explain why the PID would be different under these circumstances and if there is a solution to this. I use the PID to track the current state of the character device when multiple applications are using the same resource.