kevin@msa3b.UUCP (Kevin P. Kleinfelter) (10/17/89)
I am porting ksh to AIX. The only thing which prevents a trivial port is that AIX has both SYSV and BSD features. The make for ksh tries to work in either a SYSV or a BSD environment, and in a few places has a little trouble because it is in BOTH. After I get a clean compile and link, I fire-up ksh and get a prompt. Then I type pg foo and I get pg: cannot reopen stdout I have seen this message before, in particular on a 3B2 at an AT&T System Administration class. What does it mean (aside from the obvious)? What do I do about it? -- Kevin Kleinfelter @ Management Science America, Inc (404) 239-2347 gatech!nanovx!msa3b!kevin
rubin@cbnewsl.ATT.COM (michael.rubin) (10/21/89)
In article <1156@msa3b.UUCP> kevin@msa3b.UUCP (Kevin P. Kleinfelter) writes: >I am porting ksh to AIX. [...] After I get a clean compile and link, I fire-up >ksh and get a prompt. Then I type > pg foo >and I get > pg: cannot reopen stdout > >I have seen this message before, in particular on a 3B2 at an AT&T System >Administration class. What does it mean (aside from the obvious)? What do >I do about it? >-- >Kevin Kleinfelter @ Management Science America, Inc (404) 239-2347 >gatech!nanovx!msa3b!kevin Pg tries to open /dev/tty and produces that message when it cannot. /dev/tty doesn't work when your login shell is not the controlling process of your terminal. If you do a ps -ef, your shell will probably have a terminal of "?". This is normally caused by some process having the terminal open before you logged in - e.g. something the last user ran that is hung or ignoring signals. That process then becomes the controlling process for the terminal. To fix this, find the offending process (it'll be the only one in a ps -ef listing that IS connected to your terminal) and kill -9 it, then log out and log in again. Do you have any zombie ksh's? However, you might also have something wrong in your ksh that causes it to relinquish control of the tty; maybe it's doing a setpgrp() incorrectly. --Mike Rubin <mike@sfbat.att.com>