diff options
author | is <is@pkgsrc.org> | 1999-11-25 17:03:19 +0000 |
---|---|---|
committer | is <is@pkgsrc.org> | 1999-11-25 17:03:19 +0000 |
commit | 8f2607c18102de335840c3d04393a0d574e77e4b (patch) | |
tree | bd0420576685561f38dca2bd36138f26c3809430 /editors | |
parent | b75afb82461a0203c301fa841db4baf6e2eac149 (diff) | |
download | pkgsrc-8f2607c18102de335840c3d04393a0d574e77e4b.tar.gz |
Check return code of close()/fclose() in a few places.
Without this, joe doesn't notice that you exceeded your filesystem quota,
and happily creates a zero length file (throwing away all your changes).
Diffstat (limited to 'editors')
-rw-r--r-- | editors/joe/files/patch-sum | 3 | ||||
-rw-r--r-- | editors/joe/patches/patch-ac | 33 |
2 files changed, 35 insertions, 1 deletions
diff --git a/editors/joe/files/patch-sum b/editors/joe/files/patch-sum index 6dc24c546ae..16c120575f9 100644 --- a/editors/joe/files/patch-sum +++ b/editors/joe/files/patch-sum @@ -1,4 +1,5 @@ -$NetBSD: patch-sum,v 1.1 1999/07/09 13:50:43 agc Exp $ +$NetBSD: patch-sum,v 1.2 1999/11/25 17:03:19 is Exp $ MD5 (patch-aa) = 4d03abaa1efe74c7df2948f77ec2c2cb MD5 (patch-ab) = 66fca9918c3d57d16fba7bfc339df0d7 +MD5 (patch-ac) = 163befde22583603bc7cca3872ba0fed diff --git a/editors/joe/patches/patch-ac b/editors/joe/patches/patch-ac new file mode 100644 index 00000000000..3e0ebe41546 --- /dev/null +++ b/editors/joe/patches/patch-ac @@ -0,0 +1,33 @@ +--- ../../work/joe/b.c Fri Jan 20 09:38:25 1995 ++++ b.c Thu Nov 25 18:17:59 1999 +@@ -1928,7 +1928,7 @@ + if(s[0]=='!') pclose(f); + else + #endif +- if(zcmp(s,"-")) fclose(f); ++ if(zcmp(s,"-")) { if (fclose(f)) return error = -5; } + else fflush(f); + + opnerr:; +--- ../../work/joe/ufile.c Fri Jan 13 18:13:16 1995 ++++ ufile.c Thu Nov 25 17:25:47 1999 +@@ -135,7 +135,7 @@ + int cp(from,to) + char *from, *to; + { +- int f, g, amnt; ++ int f, g, amnt, rc; + struct stat sbuf; + + #ifdef HAVEUTIME +@@ -157,8 +157,8 @@ + } + while((amnt=read(f,stdbuf,stdsiz))>0) + if(amnt!=write(g,stdbuf,amnt)) break; +- close(f); close(g); +- if(amnt) return -1; ++ close(f); rc = close(g); ++ if(amnt || rc) return -1; + + #ifdef HAVEUTIME + #ifdef NeXT |