Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1083449
  • 博文数量: 190
  • 博客积分: 1156
  • 博客等级: 少尉
  • 技术积分: 2153
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-16 15:01
个人简介

go!go!go!

文章分类

全部博文(190)

文章存档

2023年(11)

2022年(13)

2021年(15)

2020年(38)

2019年(3)

2018年(6)

2016年(1)

2015年(16)

2014年(13)

2013年(24)

2012年(46)

发布时间:2014-01-26 13:54:09

 int sigaction(int signum, const struct sigaction *act,struct sigaction *oldact);中的           struct sigaction {               void     (*sa_handler)(int);              &nbs.........【阅读全文】

阅读(4167) | 评论(3) | 转发(2)

发布时间:2013-12-23 19:18:19

原帖:http://www.cnitblog.com/houcy/archive/2012/11/28/86801.html1.用top命令查看哪个进程占用CPU高gateway网关进程14094占用CPU高达891%,这个数值是进程内各个线程占用CPU的累加值。  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM   .........【阅读全文】

阅读(1000) | 评论(0) | 转发(0)

发布时间:2013-12-07 18:31:56

下面的setsid与 ioctl 将tty置为null的作用都是想把 子进程与当前的终端脱离,来避免信号对该终端的操作进而导致对守护进程的影响。stackoverflow中对为什么用setsid给出了详细的解释。http://stackoverflow.com/questions/8777602/why-must-detach-from-tty-when-writing-a-linux-daemon/8777697#8777697You must dis.........【阅读全文】

阅读(3317) | 评论(0) | 转发(0)

发布时间:2013-12-07 14:12:34

1.如何将 syslog在打印到 message 时,同时打印到终端上,设置标记LOG_PERROR 即可。man openlogLOG_PERROR     (Not in POSIX.1-2001.)  Print to stderr as well.openlog("syslog_test", LOG_PID | LOG_NDELAY | LOG_CONS | LOG_PERROR, LOG_LOCAL4); syslog(LOG_ALERT, "MYTEST-.........【阅读全文】

阅读(966) | 评论(0) | 转发(0)

发布时间:2013-12-06 11:26:11

给线程命名http://www.cppblog.com/beautykingdom/archive/2009/11/08/100419.aspx设置coredump标记。#if HAVE_PRCTL && defined(PR_SET_DUMPABLE)     /* Set Linux DUMPABLE flag */     if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) != 0) .........【阅读全文】

阅读(8860) | 评论(0) | 转发(1)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册