EDIT: Note that the key feature is assistance in restarting! Which the debian gizmo does. Just detecting can be done by the lsof pipe I posted.