From: Russ Cox Date: Fri, 7 Aug 2009 22:22:09 +0000 (-0700) Subject: remove 8.out before creating it. X-Git-Tag: weekly.2009-11-06~934 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=002623704fc4df936550e8261d60b0ceb5c84271;p=gostls13.git remove 8.out before creating it. 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 --- diff --git a/src/cmd/5l/obj.c b/src/cmd/5l/obj.c index 202c2e8004..7c9cb1ae24 100644 --- a/src/cmd/5l/obj.c +++ b/src/cmd/5l/obj.c @@ -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); diff --git a/src/cmd/6l/obj.c b/src/cmd/6l/obj.c index 66d1e7eede..75fe3ca031 100644 --- a/src/cmd/6l/obj.c +++ b/src/cmd/6l/obj.c @@ -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); diff --git a/src/cmd/8l/obj.c b/src/cmd/8l/obj.c index 5d230939d1..ce57521b7e 100644 --- a/src/cmd/8l/obj.c +++ b/src/cmd/8l/obj.c @@ -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);