上一页 1 ··· 6 7 8 9 10
摘要: 含有后台运行功能,日后会不定期加入管道功能,历史记录功能#include <stdio.h> #include <unistd.h> #define MAX_LINE 80 void setup(char inputBuffer[], char *args[],int *background) { int length, i, start, ct; ct = 0; length = read(STDIN_FILENO, inputBuffer, MAX_LINE); start = -1; if (length == 0) exi... 阅读全文
posted @ 2011-08-29 22:02 xxx1 阅读(252) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <sys/shm.h> #include <sys/stat.h> int main(void) { int segment_id; char* shared_memory; const int size = 4096; unsigned short mode; struct shmid_ds shmbuffer; segment_id = shmget(IPC_PRIVATE, size, S_IRUSR|S_IWUSR); shared_memory = (char*)shmat(segment_i 阅读全文
posted @ 2011-08-27 10:17 xxx1 阅读(278) 评论(0) 推荐(0) 编辑
摘要: //serverimport java.net.*;import java.io.*;public class FortuneServer{private static final String[] fortunes = { "Buy Low and Sell High","Eat Your Vegetables","Good Walls Make Good Neighbors","Never Underestimate Your Competition","A Clean Camp is a Happy 阅读全文
posted @ 2011-08-26 15:09 xxx1 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 子进程生成fibnacii 父进程输出 #include <sys/types.h> #include <sys/shm.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #define MAX_SEQUENCE 10 typedef struct { int fib_sequence[MAX_SEQUENCE]; int sequence_size; }shared_data; int main(int 阅读全文
posted @ 2011-08-25 13:10 xxx1 阅读(241) 评论(0) 推荐(0) 编辑
摘要: #include <sys/types.h> #include <stdio.h> #include <unistd.h> int value = 5; int main(void) { pid_t pid; pid = fork(); if (pid == 0) { value += 15; } else if (pid > 0) { wait(NULL); printf("PARENT: value = %d", value); exit(0); } }输出PARENT: value = 5 // (各个进程有独立存储空间)通过 阅读全文
posted @ 2011-08-24 23:36 xxx1 阅读(260) 评论(0) 推荐(0) 编辑
摘要: $su#cd /etc/yum.repos.d#chmod 777 *.*#mv *.* /home/bak#vi a.repo将如下内容粘入,保存退出(每行前一定不要留有空格)[releases-mirror.sohu.com] name=fedora-releases baseurl=http://mirrors.sohu.com/fedora/releases/15/Fedora/i386/os/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora [everything-mirror.sohu.c 阅读全文
posted @ 2011-08-16 18:05 xxx1 阅读(1154) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10