diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 73032db46..4f1ce3e07 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -67,7 +67,7 @@ fhandler_termios::tcsetpgrp (const pid_t pgid) { termios_printf ("tty %d pgid %d, sid %d, tsid %d", tc->ntty, pgid, myself->sid, tc->getsid ()); - if ((pgid != myself->pgid && !pid_exists (pgid)) || myself->sid != tc->getsid ()) + if (!pid_exists (pgid) || myself->sid != tc->getsid ()) { set_errno (EPERM); return -1;