Details
-
Enhancement
-
Resolution: Done
-
Minor
-
None
Description
The ManagedProcess kill() method relies on a scan of running processes that have a command line with -D[<processname>] in the command line, refusing to do the OS kill if > 1 such process is found.
This is troublesome if you have > 1 HC on the machine, as they are likely to use the same process names (e.g. "Server:server-one"). So the 'kill' doesn't happen, and destroy() gets used instead. Destroy doesn't seem as strong, as it seems to not prevent shutdown hook execution, leaving open the possibility of hangs.
Perhaps the PC could generate a random int or even a short and include that as a param on the command line as well, then use that as part of the discrimination check.