项目地址:https://github.com/pphboy/pihttpd
文件 p_sys.c
tinyhttpd是这样写的
但是文档是,旧的在前,新在后
int dup2(int oldfd, int newfd);
所以是,才能正常输出和输入
dup2(1,in_pipe[1]);
dup2(0,out_pipe[0]);
项目地址:https://github.com/pphboy/pihttpd
文件 p_sys.c
tinyhttpd是这样写的
但是文档是,旧的在前,新在后
int dup2(int oldfd, int newfd);
所以是,才能正常输出和输入
dup2(1,in_pipe[1]);
dup2(0,out_pipe[0]);