문제

I am using netlink socket to communicate between user space application and a kernel module. However I want to stop routing data from kernel to the user app when the user app closes. Is there a way to get an event in kernel, when a process using netlink socket terminates ?

도움이 되었습니까?

해결책

I take it that the app is closing normally?

If I were doing this, I would have the app send a message through the netlink socket back at the kernel module telling it to stop sending data when the user application receives the signal to terminate. (SIGTERM signal or closewindow events)

The sockets are bidirectional, so why not talk both ways?

Someone else might know a real answer to knowing when a process terminates, but it would be cleaner in my opinion not to hack it out like that.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top