dm: fix ioctl retry termination with signal