on loaded systems, stopGemServerGem can exit long before the gem process has truly exitted ... the following will wait until the pid exits:
while [[ ( -d /proc/$PID ) && ( -z `grep zombie /proc/$PID/status` ) ]]; do
sleep 1
done
I think this is okay ... there are a couple of scenarios in which this can hang forever, but those case occur when the gem itself is wedged (host call debugger or otherwise) and will require a kill -9 to eliminate ... hanging is probably preferable to leaving a process around without cleaning up the socket resources which is the real issue here and ...
on loaded systems, stopGemServerGem can exit long before the gem process has truly exitted ... the following will wait until the pid exits:
I think this is okay ... there are a couple of scenarios in which this can hang forever, but those case occur when the gem itself is wedged (host call debugger or otherwise) and will require a kill -9 to eliminate ... hanging is probably preferable to leaving a process around without cleaning up the socket resources which is the real issue here and ...