正如我的方式那样。谢谢.. - bjrnoveExactly the way I though it was. Thanks..--bjrnove 正是我的方式。谢谢..Exactly the way I though it was. Thanks.. 第三个参数与环境变量的存在 信息是一个常见的Unix扩展 - 但它不是甚至 部分Unix规范(导入POSIX.1 规范): http://www.opengroup.org/onlinepubs/...ions/exec.html exec系列函数将用新的过程映像替换当前进程 映像。新图像应从一个称为新过程映像文件的常规可执行文件构建 。 成功的exec不会返回,因为 调用过程映像被新过程映像覆盖。 当这个调用执行C语言程序时,它就是 应作为C语言函数调用输入如下: int main(int argc,char * argv []); 其中argc是参数count,argv是一个字符数组 指向参数本身的指针。另外,以下 变量: extern char ** environ; 初始化为指向数组的指针字符指针 环境字符串。 argv和environ数组都是由空指针终止的。终止argv 数组的空指针不计入argc。 - 任何足够高级的错误都与功能无法区分。 - Rich KulawiecThe presence of the third argument with environment variableinformation is a common Unix extension -- but it isn''t evenpart of the Unix specification (which imports the POSIX.1specification): http://www.opengroup.org/onlinepubs/...ions/exec.htmlThe exec family of functions shall replace the current processimage with a new process image. The new image shall be constructedfrom a regular, executable file called the new process image file.There shall be no return from a successful exec, because thecalling process image is overlaid by the new process image.When a C-language program is executed as a result of this call, itshall be entered as a C-language function call as follows:int main (int argc, char *argv[]);where argc is the argument count and argv is an array of characterpointers to the arguments themselves. In addition, the followingvariable:extern char **environ;is initialized as a pointer to an array of character pointers tothe environment strings. The argv and environ arrays are eachterminated by a null pointer. The null pointer terminating the argvarray is not counted in argc.--Any sufficiently advanced bug is indistinguishable from a feature.-- Rich Kulawiec 这篇关于c标准中存在哪些主要声明?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!