摘要: 拥有线程程序的编译需要加 -pthread gcc a.c -o a -pthread /* #include <pthread.h> int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_ro 阅读全文
posted @ 2023-05-02 11:24 WTSRUVF 阅读(12) 评论(0) 推荐(0) 编辑
摘要: # 终端 # 进程组 # 会话 # 守护进程 // 创建一个会话,每隔2s获取系统时间,并将时间写入到磁盘文件中 #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> #include <s 阅读全文
posted @ 2023-05-02 10:10 WTSRUVF 阅读(6) 评论(0) 推荐(0) 编辑