| Deutsch English Français Italiano |
|
<87r05mdsqz.fsf@gmail.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Alexis <flexibeast@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Can 'graphics' be a file descriptor?
Date: Thu, 02 Jan 2025 10:22:28 +1100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <87r05mdsqz.fsf@gmail.com>
References: <d0fcbe9e7b29ce6f9a0604058475b0aa9a23d5cb.camel@gmail.com>
<87msgaubjj.fsf@nosuchdomain.example.com>
<0bfa49a6d580546ab2db91aeac7627afb19e492d.camel@gmail.com>
<87ikqytb9d.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Thu, 02 Jan 2025 00:22:29 +0100 (CET)
Injection-Info: dont-email.me; posting-host="56a966fe12a3ccdc3d2ab0419f85e7a2";
logging-data="3142647"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/y6AhWL42WRRA4VL8ybWhaU5dmn31ki/A="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:3yVkyAdl4K14fMmgGad75UHcrQU=
sha1:67nQfUl0/BvocRKqQ2X5Nklxq7Y=
Bytes: 2334
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
> Why do you insist on referring to "file descriptors"? That's a specific
> term with a specific meaning: a small integer value used in POSIX I/O
> (not in standard C).
Indeed; cf. https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap03.html#tag_03_141:
> 3.141 File Descriptor
>
> A per-process unique, non-negative integer used to identify an open
> file for the purpose of file access. The values 0, 1, and 2 have
> special meaning and conventional uses, and are referred to as standard
> input, standard output, and standard error, respectively. Programs
> usually take their input from standard input, and write output on
> standard output. Diagnostic messages are usually written on standard
> error. The value of a newly-created file descriptor is from zero to
> {OPEN_MAX}-1. A file descriptor can have a value greater than or equal
> to {OPEN_MAX} if the value of {OPEN_MAX} has decreased (see sysconf)
> since the file descriptor was opened. File descriptors may also be
> used to implement message catalog descriptors and directory streams;
> see also 3.241 Open File Description.
Alexis.