发布时间:2014-12-21 21:26:59
第一阶段:Linux编程基础VM虚拟机安装Red_hat Linux操作系统定制Linux常用命令VM-Tools (编译出错的时候可以直接从虚拟机copy到pc机百度一下)Samba服务器(实现Linux系统与Windows系统交互)Notepad++(Windows下编辑,小程序)Source_Insight(Windows下编辑,大型工程)Vi.........【阅读全文】
发布时间:2014-12-21 21:16:43
/* client.c */#include <sys/types.h>#include <sys/socket.h>#include <sys/ioctl.h>#include <netinet/in.h>#include <netdb.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#define PORT 4321#define BUFFER_SIZE 1024int main(int argc,char *argv[]){struct.........【阅读全文】
发布时间:2014-12-21 21:13:22
#include<sys/types.h>#include<unistd.h>#include<stdio.h>#include<error.h>#include<stdlib.h>int main(){pid_t result;result = fork();if(result==-1){perror("fork:");exit(1);}else if(result==0){printf("Current value is %d. In child process, child PID = %d\n",result,getpid());}else .........【阅读全文】
发布时间:2014-12-21 21:06:48
#include<sys/types.h>#include<sys/stat.h>#include<fcntl.h>#include<errno.h>#include<stdio.h>#include<stdlib.h>#include<string.h>#define FIFO "/tmp/myfifo"int main(int argc,char **argv){char buf_r[100];int fd,nread;if((mkfifo(FIFO,O_CREAT|O_EXCL)<0)&(errno!=EEXIST)){printf("Can not .........【阅读全文】
发布时间:2014-12-21 21:01:29
#include<sys/types.h>#include<unistd.h>#include<stdio.h>int main(void){printf("The PID of the process is:%d\n",getpid());printf("The PPID of the process is:%d\n",getppid());return 0;}+++++++++++++++++++++++++++++++++#include<sys/types.h>#include<sys/wait.h>#include<unistd.h>#include<s.........【阅读全文】