Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!lll-lcc!unisoft!hoptoad!academ!killer!jfh From: jfh@killer.UUCP Newsgroups: comp.unix.wizards Subject: Re: /dev/stdin for 4.3? Message-ID: <958@killer.UUCP> Date: Thu, 4-Jun-87 12:11:25 EDT Article-I.D.: killer.958 Posted: Thu Jun 4 12:11:25 1987 Date-Received: Sun, 7-Jun-87 18:38:40 EDT References: <7619@brl-adm.ARPA> Organization: The Unix(tm) Connection, Dallas, Texas Lines: 26 Summary: A few new questions ... I have thought about putting this in my lowly Version 7 kernel, and I want a few questions answered. Assuming int fd; struct stat stat1, stat2; fd = open ("/dev/stdin", 0); do fstat (0, &stat1) and fstat (fd, &stat2) return the same thing? What if _after_ the open I do a freopen (stdin, ...) or a close (0) followed by open (somefile)? Does this still hold true? If memory and understanding serve me correctly, if in System V I close all my terminal files, do a setpgrp() and open some new terminal file - then open /dev/tty, I get the new tty. But what happens if I open /dev/tty before all of the closes, do the setpgrp(), and open a new tty? Seems to me (from what I remember last time I looked at the source) that /dev/tty points to the _new_ tty after the open(), not the old one since the driver gets the controlling tty from the U-page or something like that. HELP ME PLEASE (send manual pages in other words ...) - John. (Still working on a .signature in the Big D) Disclaimer: I didn't do it. Honest.