Jim Meyering <[EMAIL PROTECTED]> wrote: > 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.
Following up to myself again, and maybe answering my own question :-) I suppose there'd be no harm, per se, in omitting O_NOCTTY, but that the omission might make open do a tiny bit of unnecessary work. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils