摘要:
本来打算使用pipe进行父子进程之间的数据交互(应用场景是父进程向多个子进程分发数据,子进程进行处理);但是担心pipe的性能,转而使用mmap实现。废话少叙,上代码。#include #include #include #include #include #include #include #in... 阅读全文
摘要:
1. 基本构建,提供最简单的http服务cd nginx-1.2.6APPDIR=/home/s/apps/nginxLOGDIR=/home/s/logs/nginx./configure \ --prefix=$APPDIR \ --error-lo... 阅读全文
摘要:
#include <stdio.h>#include <sys/types.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include <iconv.h>#include <set>#define LINE_BUF_SIZE (1024 * 1024 * 8)static char g_line[ LINE_BUF_SIZE ];static char g_out[ LINE_BUF_SIZE ];static std::set< 阅读全文