summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0c285f2)
when the file system gets full, etc.
SCCS-vsn: usr.bin/mail/quit.c 2.5
* Termination processing.
*/
* Termination processing.
*/
-static char *SccsId = "@(#)quit.c 2.4 %G%";
+static char *SccsId = "@(#)quit.c 2.5 %G%";
/*
* Save all of the undetermined messages at the top of "mbox"
/*
* Save all of the undetermined messages at the top of "mbox"
}
fclose(obuf);
close(creat(mbox, 0600));
}
fclose(obuf);
close(creat(mbox, 0600));
- if ((obuf = fopen(mbox, "w")) == NULL) {
+ if ((obuf = fopen(mbox, "r+")) == NULL) {
perror(mbox);
fclose(ibuf);
unlock();
perror(mbox);
fclose(ibuf);
unlock();
cream:
if (rbuf != NULL) {
cream:
if (rbuf != NULL) {
- fbuf = fopen(mailname, "w");
+ fbuf = fopen(mailname, "r+");
if (fbuf == NULL)
goto newmail;
while ((c = getc(rbuf)) != EOF)
if (fbuf == NULL)
goto newmail;
while ((c = getc(rbuf)) != EOF)
- if ((obuf = fopen(mailname, "w")) == NULL) {
+ if ((obuf = fopen(mailname, "r+")) == NULL) {
perror(mailname);
return(-1);
}
perror(mailname);
return(-1);
}