![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
code linux
文章平均质量分 70
zylgbin
不知死,焉知生
展开
-
Linux Thread
thread习惯性使用c++的,本文着重了解一下linux 的pthread创建:int pthread_create(pthread_t *restrict tidp,const pthread_attr_t *restrict attr,void *(*start_rtn)(void *), void *restrict arg);获取线程id:pthread_t pthread_self(void);#include "log/logx.h"#include <error.h&原创 2022-04-04 10:55:37 · 194 阅读 · 0 评论 -
Linux Process_control
文章目录进程标识pidforkwait and waitpidexec进程标识pidid=0的是调度进程(swapper),该进程是内核的一部分,并不执行磁盘的任何的程序,也被称为系统进程id=1 是init进程,属于用户态进程,但是以超级用户特权运行,是所有孤儿进程的父进程#include <unistd.h>pid_t getpid(void);Returns: process ID of calling processpid_t getppid(void);Retur原创 2022-04-03 20:28:26 · 1481 阅读 · 0 评论 -
linux file_systm
文章目录file_operationopencreatecloselseekreadwritedup和dup2sync / fsyncfctnlfile_sharingfile and directorystat/fstat/lstat文件类型文件访问权限accessumaskchmod /fchmod/fchmodatchowntruncationlink and unlinksymlink文件时间修改renamemkdirchdirread directoryfile_operationopen原创 2022-01-04 23:02:09 · 527 阅读 · 0 评论