understanding some system functions

Hello ...

First of all, I want to thank you in advance for your comments ...
it is greatly appreciated ...

This is my question: ..
There are so many functions in unix that are defined like this:

SYNOPSIS
#include
#include

int open(const char * path, int oflag, ...);

I have used this function many times(open a file or device) but I don't understand how the three dots are actually implemented ...

Thank you again

TNT123
jilanski@yahoo.com

Comments

  • The ellipsis (...) means that the argument is optional and is usually not required. It actually takes [italic]mode_t mode[/italic] of the file/device which you are trying to open. The mode argument is used only when [italic]O_CREAT[/italic] (used to create a file) is specified for [italic]oflag[/italic].

    Hope this helps.

    ITA
    "Let us smite the evil slime eating hordes who may befall us on our quest to be the ultimate programmers of the known universe!"

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion