Paul Eggert <[EMAIL PROTECTED]> wrote: >>> That's the basic idea, but I'm afraid it's a bit more complicated than >>> that. The process is exposed even after it closes the terminal, since >>> it doesn't relinquish the controlling terminal even after it closes >>> the corresponding file descriptor (certainly if other processes have >>> the terminal open -- even via an independent descriptor... > >> Your use of `processes' means `processes in the same process group', right? > > No, unfortunately (if my memory is correct) it's any process, > anywhere. This dates all the way back to a hack in 7th edition Unix, > which didn't have process groups. As I dimly recall, it was a bit of > a mess.
It sounds like you're explaining why it was important to use O_NOCTTY on ancient systems. Do you really think it is important now? These days, I suspect that there's no vulnerability to interference by arbitrary processes, since all systems have the notions of a process group, a session (a la setsid), and a session leader. Otherwise, this (omitting O_NOCTTY) would constitute a significant security risk and it would have been well documented. That said, using O_NOCTTY does seem useful, if only to avoid whatever cost is involved in setting the controlling terminal. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
