![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux系统编程
sjiang
爱劳动
展开
-
高级进程管理
1.sched_yield()中断当前进程让出处理器 int sched_yield (void); 2.设置进程优先级 int nice (int inc); int getpriority (int which, int who); int setpriority (int which, int who, int prio); 3.设置I/O优先级 int ioprio_get原创 2012-08-10 14:02:05 · 660 阅读 · 0 评论 -
缓冲输入输出
1.fopen()打开文件,返回流 FILE* fopen(const char * path, const char * mode); 2.fdopen()通过文件描述符打开文件 FILE * fdopen (int fd, const char *mode); 3.fclose()关闭文件 int fclose (FILE *stream); 4.fcloseall()关闭所有文件原创 2012-08-08 16:09:55 · 2572 阅读 · 0 评论 -
进程管理
1.getpid()获得调用进程的ID pid_t getpid (void); 2.getppid()获得调用进程的父ID pid_t getppid (void); 3.exec()启动进程 int execl (const char *path, const char *arg, ...); int execlp (const char *file, const char *ar原创 2012-08-09 17:02:11 · 638 阅读 · 0 评论 -
高级文件I/O
1.readv()从fd读取count个segment到iov描述的缓冲区中 ssize_t readv (int fd, const struct iovec *iov,int count); 2.writev()从iov描述的缓冲区中读取count个segment的数据并写入fd中 ssize_t writev (int fd, const struct iovec *iov,int c原创 2012-08-09 14:46:00 · 1142 阅读 · 0 评论 -
文件I/O相关函数
1.open()系统调用 打开一个文件返回文件描述符 int open (const char *name, int flags); int open (const char *name, int flags, mode_t mode); 2.creat()函数 int creat (const char *name, mode_t mode); 3.read()读取文件 ssize原创 2012-08-08 15:03:34 · 1033 阅读 · 0 评论 -
文件与目录管理
1.获取文件信息 #include #include #include int stat (const char *path, struct stat *buf); int fstat (int fd, struct stat *buf); int lstat (const char *path, struct stat *buf); struct stat { dev_t st_d原创 2012-08-10 17:57:57 · 892 阅读 · 0 评论