上一页 1 ··· 21 22 23 24 25
摘要: 在知乎上,有个人问了这样的一个问题——为什么vfork的子进程里用return,整个程序会挂掉,而且exit()不会?并给出了如下的代码,下面的代码一运行就挂掉了,但如果把子进程的return改成exit(0)就没事。 我受邀后本来不想回答这个问题的,因为这个问题明显就是RTFM的事,后来,发现这个 阅读全文
posted @ 2016-12-10 22:09 soul.stone 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 1 首先当然是要安装samba了:sudo apt-get install sambasudo apt-get install smbfs 2 下面我们来共享群组可读写文件夹,假设你要共享的文件夹为: /home/ray/sharemkdir /home/ray/sharechmod 777 /ho 阅读全文
posted @ 2016-12-10 22:05 soul.stone 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 1、SSH分客户端openssh-client和openssh-server如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt-get install openssh-client),如果要使本机开放SSH服务就需要安装open 阅读全文
posted @ 2016-12-10 22:04 soul.stone 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 写一个模块测试proc文件的读写: 1 #include linux/module.h 2 #include linux/kernel.h 3 #include linux/proc_fs.h 4 #include linux/sched.h 5 #include asm/uaccess.h 6 7 阅读全文
posted @ 2016-12-04 19:51 soul.stone 阅读(213) 评论(0) 推荐(0) 编辑
摘要: #include <unistd.h>int execl(const char *path, const char *arg, ...);int execlp(const char *file, const char *arg, ...);int execle(const char *path, c 阅读全文
posted @ 2016-12-04 17:10 soul.stone 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 1、jiffies HZ=100,jiffies=1 means 10ms。 2,延时 unsigned long timeout = jiffies + (3*HZ); while (hwgroup->busy) { if (time_after(jiffies, timeout)) { retu 阅读全文
posted @ 2016-12-04 16:19 soul.stone 阅读(605) 评论(0) 推荐(0) 编辑
摘要: 1、启动 1)程序的运行参数。 set args //指定运行时参数。(如:set args 10 20 30 ) show args //查看设置好的运行参数。 2)运行环境 path //设定程序的运行路径。 show paths //查看程序的运行路径。 set environment var 阅读全文
posted @ 2016-12-04 16:18 soul.stone 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 1,进程绑定 #include <sched.h> cpu_set_t set;void CPU_ZERO(cpu_set_t *set);void CPU_SET(int cpu, cpu_set_t *set);void CPU_CLR(int cpu, cpu_set_t *set);int 阅读全文
posted @ 2016-12-04 14:01 soul.stone 阅读(415) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25