On Fri, Jun 03, 2016 at 12:00:11PM -0400, Lance Richardson wrote: > OK, it appears that I was probably a little too focused on the ~250 > locations where OVS_APP_EXIT_AND_WAIT() is invoked with a daemon > name (where the TMPPID stuff works fine) and not enough to the ~8 > locations where it's invoked with the path of a unixctl socket. > > Ben's suggestion to have the Windows-specfic kill() function emulate > the kill command's handling of "kill -0" should make this macro > behave as it does on other systems, but I'm wondering if it might > also be good to create a separate macro for the unixctl case. Ideally > there would be a way to derive the pid from the unixctl socket path, > but I believe we can't assume the existence of things like fuser or > lsof even on Linux or BSD systems. Or maybe this variant could > take both the unixctl socket path and pid file path as parameters.
The "kill -0" change is a tangent. It solves a particular problem, but not the root of this issue. It's a mistake to pass a unixctl socket name to OVS_APP_EXIT_AND_WAIT. A new macro is one possible solution. However, looking at a few of the cases where OVS_APP_EXIT_AND_WAIT is being passed a unixctl socket, I'm not sure why we couldn't just pass a pidfile instead. Some of the users don't have a pidfile, but why not just add one? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev