Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!agate!bionet!csd4.milw.wisc.edu!mailrus!ncar!boulder!ccncsu!longs.LANCE.ColoState.Edu!steved From: steved@longs.LANCE.ColoState.Edu (Steve Dempsey) Newsgroups: comp.unix.wizards Subject: Re: Help! "pg: cannot reopen stdout" Summary: files in /dev Keywords: /dev/tty Message-ID: <1034@ccncsu.ColoState.EDU> Date: 22 Jan 89 02:43:06 GMT References: <449@fciva.FRANKLIN.COM> Sender: news@ccncsu.ColoState.EDU Reply-To: steved@longs.LANCE.ColoState.Edu (Steve Dempsey) Organization: Colorado State University, Fort Collins, CO 80523 Lines: 28 In article <449@fciva.FRANKLIN.COM> fciva!dag@uunet.uu.net (Daniel A. Graifer) writes: >Somebody please help. > [...] >I wanted to do a chmod 622 /dev/tty1*, but I did chmod 622 /dev/tty*. -^- >I realized my mistake, did an ls -l on our old system, and chmod'd everything >back to the way it is on the old system. > >Everything seemed fine until I got on a terminal in my personal account and >tried to look at file with pg (actually, /usr/bin/pg). I got: > >pg: unable to reopen stdout > >Anybody got any ideas? Interactive things like pg often use /dev/tty as stdout. I was once frustrated for days by code that behaved like this. It turns out that the it explicitly opened /dev/tty, but reported the error cryptically as `can't open stdout' or some such. Anyway, the fix was to chmod 666 /dev/tty. I suspect that one was overlooked in the repair attempt. >Daniel A. Graifer >uunet!fciva!dag Steve Dempsey, Center for Computer Assisted Engineering Colorado State University, Fort Collins, CO 80523 +1 303 491 0630 INET: steved@longs.LANCE.ColoState.Edu, dempsey@handel.CS.ColoState.Edu UUCP: boulder!ccncsu!longs.LANCE.ColoState.Edu!steved, ...!ncar!handel!dempsey