Add TD7
This commit is contained in:
parent
4296f3a394
commit
553cdc440c
24 changed files with 919 additions and 0 deletions
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue