ulink函数的使用【学习笔记】

 1 #include "apue.h"
 2 #include <fcntl.h>
 3 
 4 int main(void)
 5 {
 6     if(open("tempfile",O_RDWR) < 0)
 7         err_sys("open error");
 8     if(unlink("tempfile") < 0)
 9         err_sys("unlink error");
10     printf("file unlinked
");
11     sleep(15);
12     printf("done
");
13 
14     exit(0);
15     return 0;
16 }
17 ~      

原文地址:https://www.cnblogs.com/zzb-Dream-90Time/p/6963833.html