GsDevKit / gsApplicationTools

This repository includes scripts and code that allow a more convenient setup of a Gemstone server application
MIT License
2 stars 2 forks source link

stopGemServerGem needs to wait until gem is truly stopped #32

Closed dalehenrich closed 9 years ago

dalehenrich commented 9 years ago

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 ...

dalehenrich commented 9 years ago

looks good