摘要: 守护进程 1、守护进程用来干啥的 守护进程主要用来将进程的父进程设置为init进程,这样的话就可以后台运行,而不依赖shell。 一般来说除非服务器关机,或是某些特殊操作,否则守护进程会一直存在。 2、守护进程的创建 简单来说: #include <unistd.h> void main(void) 阅读全文
posted @ 2024-06-28 17:09 西北小蚂蚁 阅读(3) 评论(0) 推荐(0) 编辑
摘要: TCP连接注意事项: !!!如果用到云服务器,一定要注意在建立TCP连接的时候,云服务器是否存在设置的端口号。!!! PC的话基本没有端口号限制,可以随便用,但是云服务器一般会限定端口号的数量,a56爆大奖在线娱乐一定要用云服务存在的端口号才行。 阅读全文
posted @ 2024-06-28 16:38 西北小蚂蚁 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 重写vsprintf 背景 由于软件版本问题可能会导致vsprintf函数用不了,a56爆大奖在线娱乐需要重新一下。 em_my_vprintf.c: /********************************************************************************* 阅读全文
posted @ 2024-03-08 10:27 西北小蚂蚁 阅读(9) 评论(0) 推荐(0) 编辑
摘要: Makefile减少依赖文件编译 %.o:%.c makefile all:test1.o test2.o test3.o gcc *.o -o elf echo "sucess!!" %.o:%.c gcc -c $^ -o $@ CL: rm -rf *.o elf test1 #include 阅读全文
posted @ 2023-12-11 21:57 西北小蚂蚁 阅读(8) 评论(0) 推荐(0) 编辑
摘要: OPEN #1 test.txt /Create LOCAL &Emdc_Rx_Timestape &Emdc_Rx_Timestape=V.VALUE(Emdc_Rx_Timestape) PRINT V.VALUE(Emdc_Rx_Timestape) "&Emdc_Rx_Timestape" 阅读全文
posted @ 2023-11-21 11:04 西北小蚂蚁 阅读(76) 评论(0) 推荐(0) 编辑
摘要: OPEN #1 test.txt /Create WRITE #1 %D V.VALUE(count_uss_100ms) WAIT 200.0ms WRITE #1 %D V.VALUE(count_uss_100ms) CLOSE #1 ENDDO 阅读全文
posted @ 2023-11-21 11:02 西北小蚂蚁 阅读(25) 评论(0) 推荐(0) 编辑
摘要: # __attribute__((weak)): 可以定义两个相同的函数或变量,带__attribute__((weak))的为弱,如果有不带__attribute__((weak))的变量或函数以不带的为准,若没有则以带__attribute__((weak))为准; - test_1.c: `` 阅读全文
posted @ 2023-08-14 19:34 西北小蚂蚁 阅读(20) 评论(0) 推荐(0) 编辑
摘要: # vscode终端git自动补全 - ctrl+shift+p 输入setting.json,选择如下: ![](https://img2023.cnblogs.com/blog/2468371/202308/2468371-20230814111600979-1043719235.png) - 阅读全文
posted @ 2023-08-14 11:20 西北小蚂蚁 阅读(293) 评论(0) 推荐(0) 编辑
摘要: C语言预定义宏: #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { printf(" __FUNCTION__: %s\n", __func__); printf(" __func__: %s\n", __ 阅读全文
posted @ 2023-04-14 10:53 西北小蚂蚁 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 打印文件内数据 #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include <stdlib.h> 阅读全文
posted @ 2022-09-13 16:11 西北小蚂蚁 阅读(88) 评论(0) 推荐(0) 编辑