remove temp files on close

This commit is contained in:
rsc 2004-06-17 21:19:37 +00:00
parent 005ee04b9f
commit 3f23048f7b

View file

@ -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;
}