diff options
author | des <des@FreeBSD.org> | 2000-07-26 07:28:33 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2000-07-26 07:28:33 +0000 |
commit | cef359aa2c2f4a310b233d963bc02a1209f087b1 (patch) | |
tree | 3b060a45eda0df2e906a35c1c221f63df9320a02 /usr.bin | |
parent | 57948511f591473b1f3a3ea05ea7aaf1c318f0b6 (diff) | |
download | FreeBSD-src-cef359aa2c2f4a310b233d963bc02a1209f087b1.zip FreeBSD-src-cef359aa2c2f4a310b233d963bc02a1209f087b1.tar.gz |
Restore the old semantics of deleting the output file when interrupted.
Some people liked this and some didn't, so POLA won.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/fetch/fetch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index cc49b9f..ad605bf 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -400,10 +400,12 @@ fetch(char *URL, char *path) signal: if (sigalrm) warnx("transfer timed out"); - if (sigint) + if (sigint) { warnx("transfer interrupted"); + goto failure; + } - if (!sigalrm && !sigint) { + if (!sigalrm) { /* check the status of our files */ if (ferror(f)) warn("%s", URL); |