标签:style blog class code java ext
1. fork 创建新进程
#include <unistd.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char* argv[]) { extern char** environ; for (int i = 0; i < argc; ++i) { fprintf(stdout, "argv[%d] : %s\n", i, argv[i]); } for (char** ptr = environ; *ptr != NULL; ++ptr) { fprintf(stdout, "%s\n", *ptr); } return 0; }
4.进程时间
clock_t times(struct tms *buf); struct tms { clock_t tms_utime; /* user time */ clock_t tms_stime; /* system time */ clock_t tms_cutime; /* user time of children */ clock_t tms_cstime; /* system time of children */ };
APUE 学习笔记(六) 进程控制,布布扣,bubuko.com
标签:style blog class code java ext
原文地址:http://www.cnblogs.com/wwwjieo0/p/3714780.html