* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Disallow attempts to set

the process group to a nonexistent process group.
This commit is contained in:
Christopher Faylor 2004-09-28 04:41:42 +00:00
parent 2b94cfce89
commit e3e443e4df
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-09-28 Christopher Faylor <cgf@timesys.com>
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Disallow attempts
to set the process group to a nonexistent process group.
2004-09-27 Corinna Vinschen <corinna@vinschen.de>
* lib/_cygwin_crt0_common.cc: Revert patch from 2004-09-16. Brakes

View File

@ -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 (myself->sid != tc->getsid ())
if (!pid_exists (pgid) || myself->sid != tc->getsid ())
{
set_errno (EPERM);
return -1;