/* fork children */for (i = 0; i < clients; i++) {
pid = fork();
if (pid <= (pid_t) 0) {
/* child process or error*/
sleep(1); /* make children faster */break;
}
}
杂项:
主机名最大长度:64
命令行最大长度:2048
/* 定义所在文件:/usr/include/asm/param.h */
#define MAXHOSTNAMELEN 64 /* max length of hostname */