Handle ctrl-c when executing task on remote daemon. fix #2727