Linux操作系统
托卡马克2022
这个作者很懒,什么都没留下…
展开
-
Linux 进程崩溃打印堆栈
示例代码:#include <signal.h>#include <execinfo.h>void signal_handler(int signo) { int nptrs; void *buffer[1024]; char **strings; signal(signo, SIG_DFL); nptrs = backtrace(buffer, 1024); strings = backtrace_symbols(原创 2021-05-30 14:55:39 · 1526 阅读 · 1 评论 -
Linux下TCP Socket编程实例
client.c#include <stdio.h>#include <sys/types.h>#include <sys/socket.h>#include <string.h>#include <unistd.h>#include <errno.h>#include <arpa/inet.h>...原创 2019-05-06 16:34:50 · 10971 阅读 · 0 评论 -
Linux下UDP Socket编程实例
server.c#include <stdio.h>#include <sys/types.h>#include <sys/socket.h>#include <string.h>#include <arpa/inet.h>#include <netinet/in.h>int main(int argc, ch...原创 2019-05-25 17:19:11 · 1282 阅读 · 0 评论