remove temp files on close
This commit is contained in:
parent
005ee04b9f
commit
3f23048f7b
@ -4,6 +4,12 @@
|
||||
int
|
||||
opentemp(char *template)
|
||||
{
|
||||
return mkstemp(template);
|
||||
int fd;
|
||||
|
||||
fd = mkstemp(template);
|
||||
if(fd < 0)
|
||||
return -1;
|
||||
remove(template);
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user