Home | History | Annotate | Download | only in lib

Lines Matching full:tempname

628 int copy_tempfile(int fdin, char *name, char **tempname)
633 *tempname = xmprintf("%s%s", name, "XXXXXX");
634 if(-1 == (fd = mkstemp(*tempname))) error_exit("no temp file");
636 tempfile2zap = *tempname;
647 void delete_tempfile(int fdin, int fdout, char **tempname)
651 if (*tempname) unlink(*tempname);
653 free(*tempname);
654 *tempname = NULL;
658 void replace_tempfile(int fdin, int fdout, char **tempname)
660 char *temp = xstrdup(*tempname);
668 rename(*tempname, temp);
670 free(*tempname);
672 *tempname = NULL;