Why does 'man 2 open' say that there are two kinds of open?

前端 未结 3 2127
北恋
北恋 2021-02-19 01:10

I ran into this question while typing man 2 open. It says that there are two kinds of open, one with two args, and one with three! last time i checked we could not

3条回答
  •  终归单人心
    2021-02-19 01:30

    No, they wrote in C, using varargs.

    Check out stdarg.h, where there are examples.

    A variadic function may read as many arguments as it likes from the ellipsis. Any extra arguments the function "does not want" are in fact discarded.

提交回复
热议问题