linux C
headool
这个作者很懒,什么都没留下…
展开
-
fork出来的子进程最好总是用_exit退出
摘要fork家族函数(fork, vfork)所创建的子进程最好用_exit()退出,不管是通过 man vfork还是通过看相关网站都能得到这一结论。本文主要介绍一些案例来说明使用 exit()函数退出进程会引起弊病。正文linux下man vfork可以看到这样一句话:The child must not return from the current function o原创 2012-09-25 19:53:31 · 12206 阅读 · 2 评论 -
linux错误码定义表
#ifndef _I386_ERRNO_H#define _I386_ERRNO_H#define EPERM 1 /* Operation not permitted */#define ENOENT 2 /* No such file or directory */#define ESRCH 3 /* No such proce原创 2012-10-25 09:40:33 · 534 阅读 · 0 评论 -
nginx配置root, index
root 配置网站的根目录index配置网站的入口文件nginx配置文件放在:/etc/nginx/nginx.conf/etc/nginx/sites-available/default原创 2013-10-03 09:45:57 · 2163 阅读 · 0 评论 -
centos, redhat 如何查看系统版本
cat /etc/redhat-release原创 2013-10-27 09:51:33 · 578 阅读 · 0 评论 -
nginx configure error: the HTTP rewrite module requires the PCRE library
nginx-1.3.5 configure:./configure: error: the HTTP rewrite module requires the PCRE library.You can either disable the module by using --without-http_rewrite_moduleoption, or install the PCRE原创 2013-10-27 11:14:44 · 1456 阅读 · 0 评论 -
linux socket编程
以下程序监听localhost:1234,回显用户的输入#include #include #include #include int main(){ int welcome_fd, sock_fd; //连接套接字 welcome_fd = socket(AF_INET, SOCK_STREAM, 0); { struct sockaddr_in addr; add原创 2013-11-20 18:26:01 · 715 阅读 · 0 评论