[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with daily images
From: |
Samuel Thibault |
Subject: |
Re: problems with daily images |
Date: |
Sun, 24 Jan 2021 02:18:58 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Jessica Clarke, le dim. 24 janv. 2021 00:59:23 +0000, a ecrit:
> On 24 Jan 2021, at 00:41, Damien Zammit <damien@zamaudio.com> wrote:
> > (void)ioctl(f, TIOCFLUSH, (char *) 0);
>
> It seems only QNX ends up setting POSIX for some inexplicable reason.
> Since Hurd defines TIOCFLUSH, it ends up calling this line. But
> TIOCFLUSH takes an int * pointing at flags, so when converting the
> ioctl into an RPC it'll dereference the null pointer and segfault. It
> should either pass a pointer to an int with the right flags or just use
> tcflush like a sane program.
>
> NB: Neither Linux nor FreeBSD define/implement TIOCFLUSH.
This interface seems awfully confused. Looking at occurrences in Debian
I can see all cases:
- passing the address of int x = FREAD (as apparently expected...)
- passing the address of int x = 0 (as apparently correctly interpreted
as FREAD|FWRITE)
but also
- passing the address of int x = 1
- passing a NULL address
- not passing anything (!)
I'm starting to think that perhaps we should as well just comment the
#define TIOCFLUSH from the headers, since there are so many bogus
callers of the interface.
Samuel
- Re: problems with daily images, (continued)
- Re: problems with daily images, Damien Zammit, 2021/01/23
- Re: problems with daily images, Damien Zammit, 2021/01/23
- Re: problems with daily images, Jessica Clarke, 2021/01/23
- Re: problems with daily images, Jessica Clarke, 2021/01/23
- Re: problems with daily images, Samuel Thibault, 2021/01/23
- Re: problems with daily images, Jessica Clarke, 2021/01/23
- Re: problems with daily images, Jessica Clarke, 2021/01/23
- vim build [was: problems with daily images], Samuel Thibault, 2021/01/30
- Re: vim build [was: problems with daily images], Damien Zammit, 2021/01/30
- Re: vim build [was: problems with daily images], Samuel Thibault, 2021/01/31
- Re: problems with daily images,
Samuel Thibault <=
- Re: problems with daily images, Damien Zammit, 2021/01/23
- Re: problems with daily images, Samuel Thibault, 2021/01/23
- Re: problems with daily images, Damien Zammit, 2021/01/23
- Re: problems with daily images, Samuel Thibault, 2021/01/23
- Re: problems with daily images, Samuel Thibault, 2021/01/24
- Re: problems with daily images, Paul Dufresne, 2021/01/24
- Re: problems with daily images, Samuel Thibault, 2021/01/24
- Re: problems with daily images, Paul Dufresne, 2021/01/25
- Re: problems with daily images, Samuel Thibault, 2021/01/25
Re: problems with daily images, Damien Zammit, 2021/01/23