摘要:
1、获取ID #include #include (1)pid_t getpid(void) 获取本进程ID。 (2)pid_t getppid(void) 获取父进程ID。 2、1进程创建——fork #include pid_t fork(void) 功... 阅读全文
摘要:
一、系统调用,文件访问 1、创建 int creat(const char *filename, mode_t mode) filename:要创建的文件名(包含路径,缺省为当前路径) mode:创建模式。常见创建模式: S_IRUSR 可读 S_IWUSR 可写 S_IXUSR 可执行 S_I... 阅读全文
摘要:
#include #include #include #include #include #include #include #define BUFFER_SIZE 1024 int main(int argc,char **argv) { in... 阅读全文