Hello, On Wed, Nov 18, 2015, at 02:43, Lorenzo Colitti wrote: > This patch series adds the ability for a privileged process to > destroy sockets belonging to other userspace processes via the > sock_diag interface, and implements that for TCP sockets. > > This functionality is needed on laptops and mobile hosts to > ensure that network switches / disconnects do not result in > applications being blocked for long periods of time (minutes) in > read or connect calls on TCP sockets that will never succeed > because the IP address they are bound to is gone. Closing the > sockets in the protocol layer causes these calls to fail fast and > allows applications to reconnect on another network.
I regularly do this with gdb, connecting to the process, looking up the filedescriptors in /proc/pid/fd and closing the socket. Actually it will also be removed from the poll tables and thus unlocks the system. I think a user space approach would be preferred to do so, or some out of band signalling (which we actually already have in terms of netlink monitor). Bye, Hannes -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html