You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
258 B

#include <unistd.h>
#include <string.h>
char * mktemp(char * template)
{
int pid;
int len;
pid = getpid();
len = strlen(template);
while (len-->0 && template[len] == 'X') {
template[len] = '0' + (pid % 10);
pid = pid / 10;
}
return(template);
}