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\r\n");
11     sleep(15);
12     printf("done\r\n");
13 
14     exit(0);
15     return 0;
16 }
17 ~      

 

posted @ 2017-06-08 17:10  请给我倒杯茶  阅读(1038)  评论(0编辑  收藏  举报