Lines Matching refs:tempfile
38 char *base, *cp, *template, *tempfile, *prefix = _PATH_TMP;
110 if (asprintf(&tempfile, "%.*s/%s", (int)len, prefix, template) == -1)
111 tempfile = NULL;
113 tempfile = strdup(template);
115 if (tempfile == NULL)
119 if (mkdtemps(tempfile, suffixlen) == NULL)
120 fatal("cannot make temp dir %s", tempfile);
122 (void)rmdir(tempfile);
124 if ((fd = mkstemps(tempfile, suffixlen)) == -1)
125 fatal("cannot make temp file %s", tempfile);
128 (void)unlink(tempfile);
131 (void)puts(tempfile);
132 free(tempfile);