bug-coreutils
[Top][All Lists]
Advanced

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

Re: how does O_NOCTTY help? [Re: bug in chdir-safer


From: Jim Meyering
Subject: Re: how does O_NOCTTY help? [Re: bug in chdir-safer
Date: Thu, 09 Feb 2006 17:43:47 +0100

I wrote:
> Adding O_DIRECTORY is an improvement, even for systems that do have
> O_NOFOLLOW, but how does O_NOCTTY help?  Isn't the goal of using O_NOCTTY
> to avoid provoking a signal upon e.g., read while backgrounded?  But
> chdir_no_follow never attempts a read; all it does is call fstat and close.
>
> Is there some other reason to use O_NOCTTY here?

Just so you know, I do know that O_NOCTTY prevents setting the process's
controlling terminal.  The question is how can setting the controlling
terminal cause trouble if we're guaranteed never to read from or write
to the corresponding file descriptor.




reply via email to

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