此点主要通过C语言支持可变参数实现
验证方式:
通过gcc -E预编译直接grep搜索open可以看到。open的C lib库定义函数原型确实是可变参数(2个或2个以上)的
@ubuntu:~/test$ gcc -E test23.c | grep open
...
extern int open (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
...
int fd1 = open("test01.txt", 00);
int fd2 = open("noexist.txt", 02 | 0100, 0777);