tech-toolchain archive

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

Re: [PATCH 1/3] gcc: Add missing parentheses around ternary operator



    Date:        Sun, 5 Sep 2021 05:18:44 +0000
    From:        David Holland <dholland-tech%netbsd.org@localhost>
    Message-ID:  <YTRTNGLc8iM+UPrP%netbsd.org@localhost>

  | I mean, the other reason it's harmless is that O_NOCTTY doesn't
  | actually do anything.

Oh, that I didn't know ... and I admit to not bothering to check.
I just assumed that if a process with no controlling tty opened a
tty device with that flag set, that terminal wouldn't become its
controlling tty.

If we don't implement that, is there any reason?

But now I see you're right, the only mentions of O_NOCTTY in the kernel
sources are its definition in sys/fcntl.h and a bunch of code in the linux
emulation converting the linux O_NOCTTY bit value into ours, and then
attempting to make its inverse work, for linux emulated binaries.

Oh, is it that we effectively default to O_NOCTTY on all opens,
and require TIOCSCTTY to claim a controlling terminal?

That would all then make sense.   And that the O_NOCTTY flag wasn't being
passwd through that cpp "deal with calendar" (and "at" perhaps) truly
irrelevant, and totally explains why the error affected nothing at all.

kre

ps; I am aware it is not a POSIX defined flag.




Home | Main Index | Thread Index | Old Index