Every now and then, xscreensaver dies. When it does, my session unlocks and won't lock until I restart it. Is there a way to automatically detect that xscreensaver has died, restart it, and lock the session?
Instead of starting xscreensaver directly, use a wrapper script.
#!/bin/sh prog=xscreensaver while : do $prog & wait done
Run this script as you would xscreensaver, i.e. in the background, launched from .xinitrc or equivalent. If xscreensaver dies, this script will notice and immediately restart it.