Avoid suspending multiple times

Based on <http://unix.stackexchange.com/a/63999/3645>.