Fix ps -s hang

Fixes #7999