




版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、1、指令格式:指令名稱 選擇項 參數(shù)列表選擇項以-開頭通配符* :代表文件名中的任意長度的字符串;?:代表文件名中的任一字符 :代表文件名中的任一屬于字符組中的字符2、3 gcc基本選項類型說明-E預處理后即停止,不進行編譯、匯編及連接-S編譯后即停止,不進行匯編及連接-c編譯或匯編源文件,但不進行連接-o file指定輸出文件file程序的編譯要經(jīng)歷預處理、編譯、匯編以及連接4個階段。4、其他常用工具:putty、makefile、Emacs編輯器5、Linux系統(tǒng)中“一切皆文件”。Linux操作系統(tǒng)是以文件為基礎而設計的,除了常規(guī)文件以外,目錄、設備、管道等都屬于文件。6、文件操作方式:#
2、define O_ACCMODE 0003 /主要訪問權限位的低兩位用來測試權限用#define O_RDONLY 00#define O_WRONLY 01#defein O_RDWR 02#define O_CREAT 0100#define O_EXCL 0200 /如果存在,返回錯誤#define O_NOCTTY 0400 /終端控制信息#define O_TRUNC 01000#define O_APPEND 020007、 文件打開與創(chuàng)建: if(fd_open=open("/bin/ls",O_RDONLY) = -1)perror("open&q
3、uot;);exit(EXIT_FAILURE); if(fd_open_create=open("./tmp",O_CREAT|O_EXCL,0644) = -1)perror("open");exit(EXIT_FAILURE);if(fd_create=creat("./tmp2",0644) = -1 )perror("open");exit(EXIT_FAILURE);8、 獲取文件屬性statint stat ( const char *file_name, struct stat *buf );int
4、 fstat ( int filedes, struct stat *buf );9、 opendir、closedir、readdirDIR *opendir ( const char *name );int closedir (DIR * dirp);struct dirent *readdir ( DIR * dir );10、進程及其狀態(tài)進程就是程序的一次執(zhí)行過程。進程至少要有三種基本狀態(tài)。這三種基本狀態(tài)是:運行態(tài)、就緒態(tài)和封鎖態(tài)(或等待態(tài))。進程轉(zhuǎn)換:11、 條件:由于父子進程執(zhí)行順序的不確定性,當子進程先于父進程退出時,子進程會留下一些資源來記錄運行的信息,以提供給父進程進行訪問。
5、如果父進程沒有調(diào)用wait或waitpid函數(shù)的話,則子進程將會一直保留這些信息,成為僵尸進程。如果父進程調(diào)用了wait函數(shù),子進程就不會成為僵尸進程。孤兒進程是指因父親進程先結束而導致一個子進程被init進程收養(yǎng)的進程。12、 可以通過以下方式結束進程。<1>、調(diào)用exit或_exit。<2>、在main函數(shù)中執(zhí)行return。<3>隱含的離開main函數(shù)。Return與exit區(qū)別:return 退出當前函數(shù)主體,exit()函數(shù)退出當前進程,因此,在main函數(shù)里面return(0)和exit(0)完成一樣的功能。return僅僅從子函數(shù)中返回,而子進
6、程用exit()退出,調(diào)用exit()時要調(diào)用一段終止處理程序,然后關閉所有I/O流。13、管道(Pipe)及有名管道(named pipe):管道可用于具有親緣關系進程間的通信,有名管道克服了管道沒有名字的限制,因此,除具有管道所具有的功能外,它還允許無親緣關系進程間的通信;管道的實質(zhì)是一個內(nèi)核緩沖區(qū),進程以先進先出的方式從緩沖區(qū)中存取數(shù)據(jù):管道一端的進程順序地將數(shù)據(jù)寫入緩沖區(qū),另一端的進程則順序地讀出數(shù)據(jù)。兩個局限性:1)支持半雙工;2)只有具有親緣關系的進程之間才能使用這種無名管道;讀寫特殊性:1.當讀一個寫端已經(jīng)關閉的管道時,在所有數(shù)據(jù)被讀取之后,read函數(shù)返回值為0,以指示到了文件
7、結束處;2.如果寫一個讀端關閉的管道,則產(chǎn)生SIGPIPE信號。如果忽略該信號或者捕捉該信號并處理程序返回,則write返回-1,errno設置為EPIPE14、 父子進程通過無名管道通信elseclose(pipe_fd0);printf("please input the string:");scanf("%s",buf_w);if(write(pipe_fd1,buf_w,strlen(buf_w)!=-1)printf("parent process has written:%s to the pipe!n",buf_w);c
8、lose(pipe_fd1);waitpid(result,NULL,0);exit(0);#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <sys/wait.h>#include <unistd.h>#include <string.h>main()pid_t result;int r_num;int pipe_fd2;char buf_r100,buf_w100;memset(buf_r,0,sizeof(buf_r);if(pip
9、e(pipe_fd)<0)perror("pipe");exit(EXIT_FAILURE);result=fork();if(result<0)perror("fork");exit(EXIT_FAILURE);else if(result=0)close(pipe_fd1);if(r_num=read(pipe_fd0,buf_r,100)>0)printf("child process has read %d characters from the pipe,the string is:%sn",r_num,b
10、uf_r);close(pipe_fd0);exit(0);信號是Linux系統(tǒng)中用于進程之間相互通信或操作的一種機制。信號事件的發(fā)生有兩個來源:1. 硬件來源:用戶按某些終端鍵時將產(chǎn)生信號,如CTRL+C將產(chǎn)生SIGINT(中止信號);硬件異常產(chǎn)生信號,如除數(shù)為0或無效的存儲訪問等。2. 軟件來源:終止進程信號,其他進程調(diào)用kill函數(shù),將信號發(fā)送個另一個進程或進程組;軟件異常產(chǎn)生信號。信號處理信號注銷信號注冊內(nèi)核進程用戶進程信號產(chǎn)生*生命周期(3)設計一個程序,要求打開文件“pass”,如果沒有這個文件,新建此文件;讀取系統(tǒng)文件“/etc/passwd”,把文件中的內(nèi)容都寫入“pass”文
11、件。#include <stdio.h>#include <stdlib.h>#include <fcntl.h>#include <string.h>#include <sys/types.h>int main(int agrs,char *args) int fd_src,fd_des,num;char buf10; if(fd_des=open("pass",O_CREAT|O_WRONLY|O_TRUNC,0644)<0) perror("open or create file failed
12、n"); exit(EXIT_FAILURE);if(fd_src=open("/etc/passwd",O_RDONLY,0644)=-1) perror("open passwd file failedn");exit(EXIT_FAILURE); donum =read(fd_src,buf,10);write(fd_des,buf,num);while(num >= 10);close(fd_src); close(fd_des); return 0;(4)設計一個程序,要求新建一個目錄,預設權限為d-x-x-x。 #includ
13、e<stdio.h> #include<dirent.h> #include<sys/types.h> #include<sys/stat.h>#include <fcntl.h>#include <stdlib.h>int main(int argc,char *argv)DIR *dir;int fd; if(fd=mkdir("/home/student/dir",0644)=-1) perror("directory created failed!"); exit(EXIT_
14、FAILURE); if(chmod("dir",S_IXUSR|S_IXGRP|S_IXOTH)<0)perror("chomd");exit(EXIT_FAILURE);return 0;. 實現(xiàn)兩個進程間使用消息隊列進行通信/接受消息#include<unistd.h>#include<stdlib.h>#include<stdio.h>#include<string.h>#include<errno.h>#include<sys/msg.h>#define BUFIZE
15、 1024struct msg_stlong int msg_type;char textBUFIZE;int main()int running=1;int msgid=-1;struct msg_st data;long int msgtype=0;/創(chuàng)建消息隊列msgid=msgget(key_t)1234,0666|IPC_CREAT);if(msgid=-1)fprintf(stderr,"msgget failed with error:%dn",errno);exit(EXIT_FAILURE);/從隊列中獲取消息,直到遇到end消息為止while(runni
16、ng)if(msgrcv(msgid,(void *)&data,BUFIZE,msgtype,0)=-1)fprintf(stderr,"msgget failed with error:%dn",errno);exit(EXIT_FAILURE);printf("You wrote %sn",data.text);/遇到end結束if(strncmp(data.text,"end",3)=0)running=0;/刪除消息隊列if(msgctl(msgid,IPC_RMID,0)=-1)fprintf(stderr,&qu
17、ot;msgctl(IPC_RMID)failedn");exit(EXIT_FAILURE);exit(EXIT_SUCCESS);return 0;/發(fā)送消息#include<unistd.h>#include<stdlib.h>#include<stdio.h>#include<sys/msg.h>#include<errno.h>#define MAX_TEXT 512#define BUFSIZE 1024struct msg_stlong int msg_type;char textMAX_TEXT;int ma
18、in()nt running=1;struct msg_st data;char bufferBUFSIZE;int msgid=BUFSIZE;/建立消息隊列msgid=msgget(key_t)1234,0666|IPC_CREAT);if(msgid=-1)fprintf(stderr,"msgget failed with error:%dn",errno);exit(EXIT_FAILURE);/向消息隊列中寫消息,直到寫入end結束while(running)/寫入數(shù)據(jù)printf("Enter some text:");fgets(buff
19、er,BUFSIZE,stdin);data.msg_type=1;strcpy(data.text,buffer);/消息隊列發(fā)送消息if(msgsnd(msgid,(void *)&data,MAX_TEXT,0)=-1)fprintf(stderr,"msgsnd failedn");exit(EXIT_FAILURE);/輸入end結束if(strncmp(buffer,"end",3)=0)running=0;sleep(1);exit(EXIT_SUCCESS);return 0; 2. 上機調(diào)試課件中killrecever和kill
20、sender程序。/killrecever#include <stdio.h>#include <unistd.h>#include <sys/types.h>#include <signal.h>/SIGUSR1信號處理函數(shù)void CbSigUsr1(int signo) /輸出接收到的信號信息printf("nreceive signal=%d.n",signo);void main()/安裝SIGUSR1信號if(signal(SIGUSR1,CbSigUsr1)=SIG_ERR)perror("signal
21、");return;printf("my pid is %dn",getpid(); printf("waiting for SIGUSR1.n");/暫停,等待信號 pause();/killsender#include <stdio.h>#include <signal.h>#include <unistd.h>#include <stdlib.h>void fun_ctrl_c();int main()(void)signal(SIGINT,fun_ctrl_c);printf("
22、Now I'm starting.n");while(1)printf("this is an endless loop unless Ctrl+c are pressd!n");sleep(2);exit(0);void fun_ctrl_c()printf("tCtrl+c were pressed!n");printf("t This is just an example for signal function!n");printf("treset signal SIGINTn");(voi
23、d)signal(SIGINT,SIG_DFL)1. 編程實現(xiàn)由一個父進程產(chǎn)生3個子進程,并且給三個子進程傳遞不同的參數(shù),收到a的子進程在顯示器上輸出乘法口訣表;收到b的子進程計算10??;收到c的進程計算1+2+3+19+20的結果。 /計算10!#include<stdio.h> int main()int fac=1,i; for(i=1;i<=10;i+) fac*=i;if(i<10)printf("%d*",i); Else printf("%d=",i); printf("%dn",fac);ret
24、urn 0;/乘法口訣表#include <stdio.h>int main()int i,j,result=0;for(i=1;i<=9;i+)or(j=1;j<=i;j+)result=i*j;printf("%d*%d=%d ",i,j,result);printf("n");return 0;/計算1+2+3+19+20的結果#include<stdio.h> int main()int sum=0,i; for(i=1;i<=20;i+) sum+=i;if(i<20)printf("%
25、d+",i); Else printf("%d=",i); printf("%dn",sum); return 0;/主進程#include<stdio.h>#include<stdlib.h>#include<sys/types.h>#include<unistd.h>int main(int argc,char *argv ) int flag;pid_t pid;int i=1;int sum=0;int fac=1; while(i<4) pid=fork(); if(pid=-1)
26、 perror("fork");exit(EXIT_FAILURE); switch(*argvi) case 'a': if(pid=0)printf("this is 1 child processn");for(int i=1;i<=9;i+)for(int j=1;j<=i;j+)result=i*j;printf("%d*%d=%d ",i,j,result);printf("n");break;case 'b': if(pid=0) sleep(1);prin
27、tf("this is 2 child processn");for(int i=1;i<=10;i+) fac*=i;(i<10)printf("%d*",i);else printf("%d=",i);printf("%dn",fac); break; case 'c': if(pid=0) sleep(2); printf("this is 3 child processn"); for(int i=1;i<=20;i+) sum+=i; if(i<
28、20)printf("%d+",i);else printf("%d=",i); printf("%dn",sum); break;default: exit(EXIT_FAILURE); / if(i!=3) return 0; i+; return 0;2. execve函數(shù)的應用,要在程序執(zhí)行時設定環(huán)境變量,路徑為tmp,用戶為liu,執(zhí)行命令env時把這些環(huán)境變量傳遞給系統(tǒng)。在這一函數(shù)中,參數(shù)e表示可傳遞新進程環(huán)境變量,參數(shù)v表示傳遞的參數(shù)(含命令)為構造指針數(shù)組,文件查找需給出路徑。命令env在“/bin”目錄下。把環(huán)境變量
29、設定為: char *envp=“PATH=/tmp”,”USER=liu”,NULL;參數(shù)的構造指針數(shù)組為:char *arg=“env”,NULL;因而此函數(shù)的調(diào)用形式為:execve(“/bin/env”,”env”,envp);請編寫程序進行調(diào)試。 #include<stdio.h>#include<stdlib.h>#include<unistd.h>int main()char *env="env",NULL; char *envp="PATH=/tmp","USER=liu",NULL
30、; execve("/bin/env",env,envp);return 0;使用POSIX IO實現(xiàn)計算文件大小#include <stdlib.h>#include <stdio.h>#include <errno.h>#include <fcntl.h>int my_callen ( int fd ) int len; if ( lseek( fd , 0 , SEEK_END ) = -1 ) perror( "lseek“); if ( ( len = lseek ( fd , 0 , SEEK_CUR )
31、 ) = -1 ) perror( "lseek“); return len;int main ( int argc , char * argv ) int len = -1; int fd; if ( argc < 2 ) perror ( "para“) ; if ( ( fd = open ( argv1 , O_RDONLY ) ) =-1 ) perror ( "open“) ; exit(EXIT_FAILURE); len = my_callen ( fd ) ; close(fd); if(len<0) perror ( "c
32、al“) ;elseprintf ( "There are %d bytes in file %s!n“ , len , argv1 ); return 0; 列出目錄下的文件信息#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <dirent.h>#include <errno.h>int main ( int argc, char * argv ) if ( argc < 2 ) printf ( "usage:my_g
33、etdir dirnamen“ ) ; exit ( 0 ); if ( my_read ( argv1 ) < 0 ) exit ( EXIT_FAILURE ); return 0;int my_read ( const char * path ) DIR *dir ; struct dirent *ptr; if ( ( dir = opendir ( path ) ) = NULL ) perror (" opendir“);exit(EXIT_FAILURE); while ( ( ptr = readdir ( dir ) ) != NULL ) printf (
34、"file inode :%ldtt“ , ptr->d_ino ); printf ( "file name :%sn“ , ptr->d_name ); closedir ( dir ); return 0;例:生成多個子進程#include <stdio.h>#include <stdlib.h>#include <unistd.h>main() pid_t pid; int i=1;while(i<9) pid=fork();if(pid=0) printf("I'm no. %d proces
35、s, my pid is %d.n", i, getpid();if(i!=1)return 0;i+;由于父子進程執(zhí)行順序的不確定性,當子進程先于父進程退出時,子進程會留下一些資源來記錄運行的信息,以提供給父進程進行訪問。如果父進程沒有調(diào)用wait或waitpid函數(shù)的話,則子進程將會一直保留這些信息,成為僵尸進程。如果父進程調(diào)了wait函數(shù),子進程就不會成為僵尸進程。用孤兒進程是指因父親進程先結束而導致一個子進程被init進程收養(yǎng)的進程。signal的應用#include <stdio.h>#include <signal.h>#include <u
36、nistd.h>#include <stdlib.h>void fun_ctrl_c();int main()(void)signal(SIGINT,fun_ctrl_c);printf("Now I'm starting.n");while(1)printf("this is an endless loop unless Ctrl+c are pressd!n");sleep(2);exit(0);void fun_ctrl_c()printf("tCtrl+c were pressed!n");print
37、f("t This is just an example for signal function!n");printf("treset signal SIGINTn");(void)signal(SIGINT,SIG_DFL);創(chuàng)建消息隊列#include <stdio.h>#include <sys/ipc.h>#include <sys/types.h>int main()key_t key;key=ftok(".",1);printf("the key is %xn",ke
38、y);int id;id=msgget(key+1,IPC_CREAT|0666);printf("id=%dn",id);system(“ipcs”);刪除消息隊列#include <stdio.h>#include <sys/ipc.h>#include <sys/types.h>int main()key_t key;int id;key=ftok(".",1);id=msgget(key+1,IPC_CREAT|0666);printf("id=%dn",id);msgctl(id,IPC_
39、RMID,NULL);sytem(“ipcs”);將數(shù)組str中的數(shù)據(jù)寫入文件strtext.txt中,每行一條數(shù)據(jù);隨后,將文件中的數(shù)據(jù)讀入到數(shù)組out中,輸出out數(shù)組的數(shù)據(jù)。#include <stdio.h>#include <stdlib.h>main() char str15="January","February","March","April","May", "June","July","August&qu
40、ot;,"september","October","November","December"char out1215;FILE *fp;int i;fp=fopen("strtext.txt","w");if(fp=NULL)printf("cant open file!n");exit(1); fwrite(str,15,12,fp); fclose(fp); printf("write data success!n");fp=fo
41、pen("strtext.txt","r"); if(fp=NULL)printf("cant open file!n"); exit(1);fread(out,15,12,fp); fclose(fp);printf("read data success!n"); printf("the data in array out are:n"); for(i=0;i<12;i+) printf("%sn",outi);fscanf函數(shù)實現(xiàn)scanf函數(shù)的功能#include
42、 <stdio.h>const int MAX_N = 21;int main()int i;char x;FILE *myfile = fopen("test.txt", "r"); if (myfile) for (i = 1; i <= MAX_N; i+) fscanf(myfile, "%c", &x);printf("%c", x); return 0;將文件描述符轉(zhuǎn)換為流對象#include <stdio.h>#include <stdlib.h>#i
43、nclude <unistd.h>#include <fcntl.h>#include <sys/stat.h>main() int fd;FILE *stream;unlink("test.txt"); fd=open("test.txt",O_CREAT|O_WRONLY,S_IREAD|S_IWRITE)stream=fdopen(fd,"w");if(stream=NULL) printf("fdopen failedn");else fprintf(stream, &q
44、uot;Hello worldn"); fclose(stream);printf("the content of the test.txt is:n"); system("cat test.txt"); return 0; 文件的創(chuàng)建,打開#include <fcntl.h>#include <stdio.h>#include <stdlib.h>main(int argc, char * argv ) int fd_open, fd_open_create, fd_create; if(fd_open=o
45、pen("/bin/ls",O_RDONLY) = -1)perror("open");exit(EXIT_FAILURE); printf ( "the file's descriptor is: %dn " , fd_open ); if(fd_open_create=open("./tmp",O_CREAT|O_EXCL,0644) = -1)perror("open");exit(EXIT_FAILURE); printf ( " the tmp1 file descr
46、iptor is: %dn" ,fd_open_create);if(fd_create=creat("./tmp2",0644) = -1 )perror("open");exit(EXIT_FAILURE); printf("the tmp2 file descriptor is: %dn",fd_create);close(fd_open); close(fd_open_create); close(fd_create); return 0;文件讀寫#include <stdio.h>#include &l
47、t;stdlib.h>#include <unistd.h>int main() char buf80; int n; n=read(STDIN_FILENO,buf,80);if(n<0) perror("read STDIN_FILENO"); exit(EXIT_FAILURE); write(STDOUT_FILENO,buf,n); printf("n");return 0;使用POSIX IO實現(xiàn)文件拷貝 #include <stdio.h>#include <stdlib.h>#include
48、 <fcntl.h>#include <string.h>#include <sys/types.h>main(int argc, char * argv) int fd_src,fd_des; char buf128;int num;if(argc!=3) printf("tje format must be: cp file_src file_des");exit(EXIT_FAILURE); if(fd_src=open(argv1,O_RDONLY)=-1) perror("open1");exit(EXIT_
49、FAILURE); if(fd_des=open(argv2,O_CREAT|O_EXCL|O_WRONLY,0644)=-1) perror("open2");exit(EXIT_FAILURE); do num=read(fd_src,buf,128);write(fd_des,buf,num);while(num=128);close(fd_src); close(fd_des);父子進程的交替執(zhí)行int main() pid_t pid; printf(“Lets study fork function!n”); pid=fork(); switch(pid) ca
50、se -1: perror(“fork failure”); break; case 0: printf(“hellow, Im child process, my pid is %d, my parent is %d!n”, getpid(), getppid(); break;default:printf(“hi, Im parent process, my pid is %d!n”,getpid(); break; exit(0);父子進程讀寫文件#include <stdlib.h>#include <stdio.h>#include <unistd.h&
51、gt;#include <sys/stat.h>#include <sys/types.h>#include <fcntl.h>int main() int fd; pid_t pid; char buf45;if ( ( fd = open ( “code”, O_CREAT|O_RDWR|O_TRUNC, S_IRWXU ) ) < 0 ) perror ( "open error“ ); exit ( 0 ); pid = fork ( );switch ( pid ) case -1: perror ( "fork erro
52、r“ ); break; case 0: printf ( "child processn“ ); if (write(fd,"I'm child process. Daddy, do you see me?“,41 )<0) perror ( "child error“ ); exit ( 0 ); break; default : sleep ( 6 ); printf ( "nparent processn“ ); lseek ( fd, 0, SEEK_SET); if ( read ( fd, buf, 41) < 0 )
53、perror ( "parent error“ ); exit ( 0 ); printf("n%sn",buf); close(fd); break; 生成多個子進程#include <stdio.h>#include <stdlib.h>#include <unistd.h>main() pid_t pid; int i=1; while(i<9) pid=fork();if(pid=0) printf("I'm no. %d process, my pid is %d.n", i, get
54、pid(); if(i!=1)return 0;i+;產(chǎn)生一個孤兒進程#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <sys/types.h>int main ( ) pid_t pid; int k=3; pid = fork ( ); switch ( pid ) case -1: perror ( "fork errorn“ ); break;case 0 : while ( k > 0 ) printf ( "I'm ch
55、ild process, my PID is %d, my parent is %d.n", getpid ( ), getppid ( ) );sleep(1); k-;break;default : printf ( "I'm parent process, my PID is %d.n", getpid ( ) ); break; exit與return的區(qū)別C語言關鍵字與函數(shù)exit()在main函數(shù)退出時有相似之處,但兩者有本質(zhì)的區(qū)別:return 退出當前函數(shù)主體,exit()函數(shù)退出當前進程,因此,在main函數(shù)里面return(0)和exi
56、t(0)完成一樣的功能。return僅僅從子函數(shù)中返回,而子進程用exit()退出,調(diào)用exit()時要調(diào)用一段終止處理程序,然后關閉所有I/O流。守護進程的實現(xiàn) #include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <signal.h>#include <fcntl.h>#include <sys/syslog.h>#include<sys/param.h>#include<sys/types.h>#include <
57、;sys/stat.h>int init_daemon(const char *pname,int facility) int pid;int i;signal(SIGTTOU,SIG_IGN);signal(SIGTTIN,SIG_IGN);signal(SIGTSTP,SIG_IGN);signal(SIGHUP,SIG_IGN);pid=fork();if(pid>0)exit(EXIT_SUCCESS);else if(pid<0)perror("fork");exit(EXIT_FAILURE);setsid();pid=fork();if(pi
58、d>0)exit(EXIT_SUCCESS);else if(pid<0)perror("fork");exit(EXIT_FAILURE);for(i=0;i<NOFILE;i+)close(i);open("/dev/null",O_RDONLY);open("/dev/null",O_RDWR);open("/dev/null",O_RDWR);chdir("/");umask(0);signal(SIGCHLD,SIG_IGN);openlog(pname,LOG_PI
59、D,facility);return;main(int argc,char * argv) FILE *fp;time_t ticks;init_daemon(argv0,LOG_KERN);while(1)sleep(1);ticks=time(NULL);syslog(LOG_INFO,"%s",asctime(localtime(&ticks);父子進程通過無名管道通信#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <sys/wait.h>#include <unistd.h>#include
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 綿陽師范學院《無機及分析化學實驗一》2023-2024學年第二學期期末試卷
- 四川省南充市儀隴縣2025年初三階段性測試(二)生物試題B卷含解析
- 南通啟秀中學2025年初三3月綜合測試(一)生物試題試卷含解析
- 山東省青島市開發(fā)區(qū)八中學2025年初三下學期3月適應性檢測試題化學試題含解析
- 洛陽理工學院《建筑信息模型》2023-2024學年第二學期期末試卷
- 眉山藥科職業(yè)學院《醫(yī)學細胞基礎Ⅰ》2023-2024學年第二學期期末試卷
- 2025年職業(yè)技能培訓師考試試卷及答案
- 上海市閔行區(qū)2025屆初三下學期期中考試物理試題(A卷)含解析
- 2025年新媒體技術在教育中的應用試題及答案
- 2025年英語四級復習考試試題及答案
- EAP服務案例解析
- 產(chǎn)品思維到用戶思維
- 華為成本控制 論文
- “九小”場所、沿街門店安全排查表
- GB/T 40822-2021道路車輛統(tǒng)一的診斷服務
- 仿生原理與創(chuàng)新設計課件
- 【自考練習題】大連理工大學概率論與數(shù)理統(tǒng)計真題匯總(附答案解析)
- 小兒吸痰法講稿
- xx學校研學旅行活動告家長書
- (格式已排好)國家開放大學電大《計算機應用基礎(專)》終結性考試大作業(yè)答案任務一
- 中秋節(jié)英文PPT
評論
0/150
提交評論