limit signals to 2 and 3. Ceck for killed after each download

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)