Fixed bugs handling (background) orphaned process groups.  tty writes and tty ioctls by processes in such groups must return -1/EIO, but they were allowed.  tty reads were handled correctly.
Fixed bugs handling (background) orphaned process groups.  tty
writes and tty ioctls by processes in such groups must return
-1/EIO, but they were allowed.  tty reads were handled correctly.

Found by:	NIST PCTS

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase