- 博客(6)
- 收藏
- 关注
原创 LinuxC进程间通信之共享内存、信号量综合实例
此案例包含IPC中信号量及共享内存综合实例 主要技术点包括了: 1.多线程及线程将通信传参 2.信号量 3.共享内存
2023-01-27 19:39:59
253
原创 Linux下V4L2使用流程
Linux下V4L2使用流程 测试平台:vm15 ubuntu20.04 测试摄像头:小米笔记本电脑自带摄像头、优迈Q5 摄像头 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #inclu
2022-09-12 00:37:17
1159
原创 Linux C select多路复用并发服务器详解
Linux C select多路复用并发服务器详解 先看代码,然后我们再来看下详解: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <strings.h> #include <sys/types.h> #include <sys/socket.h> #include <unistd.h> #include <s
2021-09-08 19:49:11
231
原创 Linux C 创建守护进程步骤
Linux C创建守护进程步骤 前言 我觉得在学习如何学习创建守护进程前首先应知道何为守护进程,那么什么是守护进程呢? 刘忆智等编著的《Linux从入门到精通》(第2版)一书中是这样定义的:守护进程(daemon)是一类在后台运行的特殊进程,用于执行特定的系统任务。很多守护进程在系统引导的时候启动,并且一直运行直到系统关闭。另一些只在需要的时候才启动,完成任务后就自动结束。而我理解的是:运行于后台,且不会受终端控制的特殊进程。 下面我们先来看下一个创建守护进程的过程。 创建孤儿进程(创建子进程,终止父进程
2021-09-04 20:26:37
284
原创 c语言选择排序
c语言选择排序 #include <stdio.h> #include <time.h> #include <stdlib.h> #include <string.h> #define LEN 10 int RandNum(int *arr, int len);//产生随机数 int SelectSort(int *arr, int len);//选择排序 int PrintNum(int *arr, int len);//打印数组内容 int main
2021-09-01 13:03:25
124
原创 Linux C TCP服务器demo
TCP服务器demo 基于TCP服务器, fork多进程并发服务器 #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #include <sys/signal.h> #
2021-08-27 16:49:27
339
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅