Restoring lost screen sockets

published on 2007-12-20 in computing

Do your screen sockets get nuked and you can't connect to your screen sessions? If something auto-cleans the /tmp dir, you may have seen this before. If you're like me, you end up with 10 or so shells with various programs running that you then have to follow the process tree to kill off. This is my only real (huge) frustration with screen. Well, here's ya go:

ps -x | grep SCREEN | awk '{print $1}' | xargs kill -CHLD

Enjoy!