]> sourceware.org Git - newlib-cygwin.git/commitdiff
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Disallow attempts to set
authorChristopher Faylor <me@cgf.cx>
Tue, 28 Sep 2004 04:41:42 +0000 (04:41 +0000)
committerChristopher Faylor <me@cgf.cx>
Tue, 28 Sep 2004 04:41:42 +0000 (04:41 +0000)
the process group to a nonexistent process group.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_termios.cc

index 75e4619300b9921ea0b030039f4c17e6052b7c9b..c0b6fe8ad34cd0abc114d1e9a40037d2033e5a4b 100644 (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
index ecef3b8a91bf82e07779cff5b4348eeaa26e8215..4f1ce3e07ff23f98d7f6ee50b6ceab1cb2acc9c5 100644 (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;
This page took 0.029737 seconds and 5 git commands to generate.