摘要: 1.学习笔记 2.遇到问题 什么是轻量级线程? 3.解决方法 经过上网查询资料得知 轻量级线程(LWP)是一种由内核支持的用户线程。它是基于内核线程的高级抽象,因此只有先支持内核线程,才能有LWP。每一个进程有一个或多个LWPs,每个LWP由一个内核线程支持。 由于每个LWP都与一个特定的内核线程关 阅读全文
posted @ 2022-10-16 19:26 20201204于瀛鹏 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1.代码 #include <stdio.h> #include <stdlib.h> #include <utmp.h> #include <fcntl.h> #include <unistd.h> #include <time.h> #define SHOWOST void showinfo(s 阅读全文
posted @ 2022-10-16 16:07 20201204于瀛鹏 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 代码 #include <stdio.h> #include <sys/types.h> #include <dirent.h> #include <sys/stat.h> #include <pwd.h> #include <grp.h> #include <unistd.h> #include 阅读全文
posted @ 2022-10-16 16:00 20201204于瀛鹏 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 1.代码 #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <errno.h> #in 阅读全文
posted @ 2022-10-16 15:48 20201204于瀛鹏 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 1.使用stat截图 2.man -k grep -r的使用 3.伪代码 首先判断输入中是否包含文件参数,如果有则继续,没有则提示用户输入错误。 然后查找并将文件的相关参数进行保存,声明结构体,并调用stat()函数给结构体赋值,将文件的设备编号、节点、文件的类型和存取的权限、连到该文件的硬链接数目 阅读全文
posted @ 2022-10-16 15:29 20201204于瀛鹏 阅读(25) 评论(0) 推荐(0) 编辑