`
mactonish
  • 浏览: 16876 次
  • 性别: Icon_minigender_2
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表

fork exec

    博客分类:
  • c
#include <sys/types.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> int main(void) { pid_t result; result=fork(); if(result==-1){ // perrer("fork"); exit; }else if(result==0){ printf("result=%d,ppid=%d,pid=%d\n",result,get ...
两个终端运行,一个输入,一个输出 #!/bin/sh if [ ! -p /root/mytest/testpipe ] then /bin/mknod /root/mytest/testpipe p fi while : do read msg if [ "$msg" = "" ] then continue else echo "$msg" fi done < /root/mytest/testpipe #! ...
Global site tag (gtag.js) - Google Analytics