run-command: dup_devnull(): guard against syscalls failing