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
guest@ugun13.UUCP (10/19/89)
I've seen your problem with pg and I had a similar problem. In fact pg wants to reopen stdout, but on UNIX with real AT&T-UNIX (not Berkley) this would not work in certain reasons. If you're diconnecting the calling process from the controlling tty the pg will present this nice message and stop work. Normally the controlling tty will be changed, if you use the library command setpgrp(). I hope that will help you. Bye Rolf. Rolf Enners +----------------------------------------------------------------------------+ | | | Nixdorf Computer AG Phone: +49-5251-10-4672 Fax: +49-5251-10-4672 | | Bereich DX-LT UUCP: {uunet!philabs!linus!}nixbur!enners.pad | | Heinz Nixdorf Ring nixntc!enners.pad | | D-4790 Paderborn {mcvax!}unido!nixpbe!enners.pad | | | +----------------------------------------------------------------------------+
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>