LWP:light weight process 轻量级的进程,本质仍是进程(在Linux环境下) 进程:独立地址空间,拥有PCB 线程:也有PCB,但没有独立的地址空间(共享) 区别:在于是…
(一)Linux常规信号一览表 1) SIGHUP: 当用户退出shell时,由该shell启动的所有进程将收到这个信号,默认动作为终止进程 2) SIGINT:当用户按下了<Ctrl+C>…
存储映射I/O 存储映射I/O (Memory-mapped I/O) 使一个磁盘文件与存储空间中的一个缓冲区相映射。于是当从缓冲区中取数据,就相当于读文件中的相应字节。于此类似,将数据存入缓冲区,…
// ps aux|grep bash int main() { int fd[2]; pipe(fd); pid_t pid = fork(); …
🔗 备份地址: 【execv函数族】
生成动态库: #首先,生成带有PIC选项的.o文件 gcc -fPIC -c *.c -I ../include #将.o文件打包为动态库 gcc -shared -o libDynamic.so *…
typedef struct _t { int** p; }T; void test(int **p) { int** t = (int **)realloc(p,80000);…
#include <iostream> using namespace std; /* * 规则: * 1、static 变量:声明在类中,定义赋值在类外 * 2、const 变量…
#include <stdio.h> #include <stdlib.h> /** * * bss段的变量 * 没有初始化的和初始化为0的全局变量和静态变量,bs…
#include <iostream> #include <bitset> #include <string> #include <sstream> #…