run-command: use thread-aware die_is_recursing routine