From owner-freebsd-questions Tue Aug 28 6:57:49 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id B7B3737B403 for ; Tue, 28 Aug 2001 06:57:46 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.11.4/8.11.4) id f7SDvi304379; Tue, 28 Aug 2001 08:57:44 -0500 (CDT) (envelope-from dan) Date: Tue, 28 Aug 2001 08:57:43 -0500 From: Dan Nelson To: FreeBSD Cc: freebsd-questions@FreeBSD.ORG Subject: Re: open() in FreeBSD? Message-ID: <20010828085743.A25951@dan.emsphone.com> References: <20010827222534.B17383@dan.emsphone.com> <20010828014650.T44951-100000@Amber.XtremeDev.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010828014650.T44951-100000@Amber.XtremeDev.com> User-Agent: Mutt/1.3.21i X-OS: FreeBSD 5.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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