07 2012 档案
摘要:从以前的笔记中找到的,simple but useful=============================调试:gdb list //list code run kill //end debug n=next quit //terminate gdb break lineofcode delete break(breakpoints) numofbreak watch gdb基本命令2 ---------------------------- 命令 描述 break(或b) 行号 在某一行设置断点 break 函数名 在某个函数开头设置断点 break ... if ... 设置条件断
阅读全文
摘要:from :http://www.latelee.org/using-gnu-linux/97-how-to-use-doxygen-under-linux.htmldoxygen是一种从源代码生成文档的工具,支持多种语言。当然,源代码中需按一定的格式写注释,这些注释的格式也能帮助我们养成很好的注释习惯,可以尝试一下。使用doxygen生成文档的方法很简单:$ doxygen -g –s$ doxygen只需两个简单命令就可以了。example code: /** *本轮奖励(暂100分制)*@param现有的分数*@param之前的分数*/voidUpdate_New_Scor...
阅读全文
摘要:利用scp传输文件 1、从服务器下载文件 例如 把192.168.0.101上的/home/kimi/test.txt的文件下载到 /tmp/local_destination 2、上传本地文件到服务器 例如 把本机/var/www/目录下的test.php文件上传到192.168.0.101这台服
阅读全文
摘要:ssh cann't connected ,event in localhost[root@localhost ssh]# ssh 127.0.0.1Read from socket failed: Connection reset by peertry the following refer to internet ,but failed (the reference OS is UBUNTU, while mine is fedora )[root@localhost ~]#ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key [root@l
阅读全文
摘要:from:http://middleware123.com/tuxedo/intro/303.html1.处理SIGCHLD信号 当编写fork子进程处理连接的服务器程序时,子进程退出会给父进程产生SIGCHLD信号,父进程若不处理该信号会导致僵尸进程。 处理SIGCHLD信号,使用waitpid调用,不能使用wait简单处理。一般的处理方法如下(信号处理函数): voidsig_chld(int signo){ pid_t pid; int stat; while ( (pid = waitpid(-1, &stat, WNOHANG)) > 0 ) cont...
阅读全文