diff options
author | Christopher Faylor <me@cgf.cx> | 2004-09-28 04:41:42 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-09-28 04:41:42 +0000 |
commit | e3e443e4df7faa1de17ed4b472ecf6d3068f86d1 (patch) | |
tree | da51bcde5a4f07ec4a95dc1decf947faa544aef6 /winsup/cygwin/fhandler_termios.cc | |
parent | 2b94cfce8932fdf3a1f88b8a909cb0fb65bcb9b7 (diff) | |
download | cygnal-e3e443e4df7faa1de17ed4b472ecf6d3068f86d1.tar.gz cygnal-e3e443e4df7faa1de17ed4b472ecf6d3068f86d1.tar.bz2 cygnal-e3e443e4df7faa1de17ed4b472ecf6d3068f86d1.zip |
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Disallow attempts to set
the process group to a nonexistent process group.
Diffstat (limited to 'winsup/cygwin/fhandler_termios.cc')
-rw-r--r-- | winsup/cygwin/fhandler_termios.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index ecef3b8a9..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 (myself->sid != tc->getsid ()) + if (!pid_exists (pgid) || myself->sid != tc->getsid ()) { set_errno (EPERM); return -1; |