摘要: cJSON API 说明 cJSON_Version() 获得cJSON的版本 cJSON_InitHooks(); 初始化cJSON_Hooks结构体 cJSON_Parse(); 将字符串解析成cJSON结构体 cJSON_ParseWithOpts() 使用一些配置解析字符串 cJSON_Pr 阅读全文
posted @ 2019-06-12 20:06 chiwin 阅读(2225) 评论(0) 推荐(0) 编辑
摘要: pthread_detach()即主线程与子线程分离,子线程结束后,资源自动回收。 pthread_join()即是子线程合入主线程,主线程阻塞等待子线程结束,然后回收子线程资源。 默认情况下,线程被创建成可结合的。 为了避免存储器泄漏,每个可结合线程都应该要么被显示地回收,即调用pthread_j 阅读全文
posted @ 2019-06-11 14:21 chiwin 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 【基本条件】 编译时需要加--gcc -g选项; 【基本命令】 l 查看源码 b 加断点r 开始运行调试n 下一步s下一步但是会进入子函数p 输出数据c跳过直到下一个断点处q表示程序退出 help 查询指令,可以使用help来查看其他指令的用法,例如help print;同【man】 shell 启 阅读全文
posted @ 2019-06-06 20:59 chiwin 阅读(155) 评论(0) 推荐(0) 编辑
摘要: https://help.aliyun.com/knowledge_detail/40564.html?spm=a2c4e.11153940.blogcont272172.10.b09e28a6AOdITp#Linux http://man7.org/linux/man-pages/man1/nse 阅读全文
posted @ 2019-06-06 19:38 chiwin 阅读(2977) 评论(0) 推荐(2) 编辑
摘要: ps -ef find PID cat /proc/$PID/environ | grep ENV 阅读全文
posted @ 2019-06-06 19:33 chiwin 阅读(1376) 评论(0) 推荐(0) 编辑
摘要: touch test.sh touch exec.sh 结果:nice 阅读全文
posted @ 2019-06-05 21:01 chiwin 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 构造 touch f1 ln f1 f2 # 硬连接文件f2ln -s f1 f3 #软连接文件f3ls -li # -i参数显示文件的inode节点信息9797648 -rw-r--r-- 2 oracle oinstall 0 Apr 21 08:11 f19797648 -rw-r--r-- 阅读全文
posted @ 2019-05-27 21:18 chiwin 阅读(170) 评论(0) 推荐(0) 编辑
摘要: .a gcc -c test1.c test2.c(或者g++ -c test1.cpp test2.cpp ) .o ar -r libtest.a test1.o test2.o (或者 ar rcs libtest.a test1.o test2.o) .a g++ -o main main. 阅读全文
posted @ 2019-05-27 20:06 chiwin 阅读(209) 评论(0) 推荐(0) 编辑
摘要: getopts optionString opt; optionString :所有参数组成的-参数串; opt:从optionString 每次取的参数值; 当optionString用【:】开头,getopts会区分参数无效错误和参数丢失错误。 参数无效时, opt会被设成【?】参数丢失时,op 阅读全文
posted @ 2019-05-20 17:33 chiwin 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.voidcn.com/article/p-yizkqdxp-zg.html 阅读全文
posted @ 2019-05-14 17:45 chiwin 阅读(209) 评论(0) 推荐(0) 编辑