cope with unix ORCLOSE
This commit is contained in:
parent
5bae51dd93
commit
97e85ebf11
@ -669,7 +669,7 @@ rowload(Row *row, char *file, int initing)
|
||||
if(ndumped >= 0){
|
||||
/* simplest thing is to put it in a file and load that */
|
||||
sprint(buf, "/tmp/d%d.%.4sacme", getpid(), getuser());
|
||||
fd = create(buf, OWRITE|ORCLOSE, 0600);
|
||||
fd = create(buf, OWRITE, 0600);
|
||||
if(fd < 0){
|
||||
free(r);
|
||||
warning(nil, "can't create temp file: %r\n");
|
||||
@ -693,6 +693,7 @@ rowload(Row *row, char *file, int initing)
|
||||
Bterm(bout);
|
||||
free(bout);
|
||||
textload(&w->body, 0, buf, 1);
|
||||
remove(buf);
|
||||
close(fd);
|
||||
w->body.file->mod = TRUE;
|
||||
for(n=0; n<w->body.file->ntext; n++)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user