bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ununnecessary [sic] open(2) mode args


From: Takeshi Nishimura
Subject: Re: [PATCH] ununnecessary [sic] open(2) mode args
Date: Thu, 9 Oct 2025 18:25:49 +0200

On Thu, Oct 9, 2025 at 6:21 PM Stan Marsh <gazelle@xmission.com> wrote:
>
>
> >> It's not a big deal but it is a bit confusing to see these modes in
> >> the code. Is there some platform where the mode arg is used in this
> >> situation?
>
> >K&R2 documents a non-variadic prototype for open.  There were probably
> >platforms that actually used that declaration at that time.
>
> If open(2) were being spec'd today, they probably would not make it
> variadic.  That seems like a relic from the days of 110 baud
> teletypes, where literally every extra character typed was something
> to be avoided if possible.

No, this was done to allow vendor-specific extensions, without having
to add more syscalls.
-- 
Internationalization&localization dev / 大阪大学
Takeshi Nishimura <takeshi.nishimura.linux@gmail.com>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]