Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Aug 2001 08:57:43 -0500
From:      Dan Nelson <dnelson@emsphone.com>
To:        FreeBSD <freebsd@XtremeDev.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: open() in FreeBSD?
Message-ID:  <20010828085743.A25951@dan.emsphone.com>
In-Reply-To: <20010828014650.T44951-100000@Amber.XtremeDev.com>
References:  <20010827222534.B17383@dan.emsphone.com> <20010828014650.T44951-100000@Amber.XtremeDev.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Aug 28), FreeBSD said:
> Ahh, thanks all! Out of curiosity however, wouldn't it be a good
> thing to have it default to umask if no arguments were passed rather
> than making it a required arg, and just using random data if none was
> passed? Seems awfully iffy doing that.. O'well. Just a thought.
> Thanks for the rapid replies all!

The called function has no idea how many arguments were pushed onto the
stack by the caller.  Just like printf() counts "%"s in the format
string to determine how many arguments it was passed, open() checks the
flags field to determine whether there is a third arguemnt or not.

-- 
	Dan Nelson
	dnelson@emsphone.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010828085743.A25951>