This commit is contained in:
Yorick Barbanneau 2023-04-17 23:40:08 +02:00
parent 4296f3a394
commit 553cdc440c
24 changed files with 919 additions and 0 deletions

View file

@ -0,0 +1,18 @@
#include <stdlib.h>
#include <fcntl.h>
#include <stdio.h>
int main(void) {
char name[] = "/tmp/mytest-XXXXXX";
int ret;
ret = mktemp(name);
if (ret < 0)
perror("mktemp");
ret = open(name, O_RDWR|O_CREAT|O_TRUNC, 0600);
if (ret < 0)
perror("open");
else
printf("ok\n");
return 0;
}