* syscalls.cc (open): Semi-revert (?) to allowing open of a tty to become
controlling tty if there is no controlling tty.
This commit is contained in:
@@ -1275,7 +1275,7 @@ open (const char *unix_path, int flags, ...)
|
||||
tty for the process. */
|
||||
int opt = PC_OPEN | ((flags & (O_NOFOLLOW | O_EXCL))
|
||||
? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW);
|
||||
if (!(flags & O_NOCTTY) && fd > 2)
|
||||
if (!(flags & O_NOCTTY) && fd > 2 && myself->ctty > 0)
|
||||
{
|
||||
flags |= O_NOCTTY;
|
||||
opt |= PC_CTTY; /* flag that, if opened, this fhandler could
|
||||
|
Reference in New Issue
Block a user