]> Cypherpunks repositories - gostls13.git/commitdiff
remove 8.out before creating it.
authorRuss Cox <rsc@golang.org>
Fri, 7 Aug 2009 22:22:09 +0000 (15:22 -0700)
committerRuss Cox <rsc@golang.org>
Fri, 7 Aug 2009 22:22:09 +0000 (15:22 -0700)
hope this will work around Mac NFS bug
where writing to an 8.out that has crashed
recently sometimes wedges NFS.

R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=32906
CL=32908

src/cmd/5l/obj.c
src/cmd/6l/obj.c
src/cmd/8l/obj.c

index 202c2e800469bc45fc96ff614b25b6c18dd49210..7c9cb1ae24d11669ea66b7a869ffa76748282498 100644 (file)
@@ -252,6 +252,7 @@ main(int argc, char *argv[])
        dtype = 4;
        if(outfile == 0)
                outfile = "5.out";
+       unlink(outfile);
        cout = create(outfile, 1, 0775);
        if(cout < 0) {
                diag("%s: cannot create", outfile);
index 66d1e7eedec4eb9fd28b9b933cffbdd60b6f4757..75fe3ca03135833fbcc1d8fd202635bc3c91da9c 100644 (file)
@@ -337,6 +337,7 @@ main(int argc, char *argv[])
        edatap = P;
        pc = 0;
        dtype = 4;
+       unlink(outfile);
        cout = create(outfile, 1, 0775);
        if(cout < 0) {
                diag("cannot create %s", outfile);
index 5d230939d1577d9a645746c1ade307456df5a086..ce57521b7e36aa062cdda6e33291fad03118b64b 100644 (file)
@@ -306,6 +306,7 @@ main(int argc, char *argv[])
        edatap = P;
        pc = 0;
        dtype = 4;
+       unlink(outfile);
        cout = create(outfile, 1, 0775);
        if(cout < 0) {
                diag("cannot create %s", outfile);