Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!david From: david@sun.uucp (David DiGiacomo) Newsgroups: comp.windows.news Subject: Re: Fun with forkunix Message-ID: <78980@sun.uucp> Date: 24 Nov 88 00:29:37 GMT References: <8811221635.AA10468@devnull.sun.com> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 45 In article <8811221635.AA10468@devnull.sun.com> dshr@SUN.COM (David Rosenthal) writes: >> >> When invoking NeWS from suntools, defining a console window "breaks" any >> console association in an underlying suntools window. How can I get >> that association back without killing and restarting the suntools console >> window? >> >This is a problem with the definition of the TIOCCONS ioctl. There is no >way to re-establish the association. Do not run a NeWS console if you >are running on top of SunView. ????? Simply run this program in the SunView (ex-)console window, and it will be the console once again: /* * setcons.c * * Makes the argument tty (default /dev/tty) the console. */ #include #include #include main(argc, argv) int argc; char *argv[]; { char *dev; int fd; dev = argc > 1 ? argv[1] : "/dev/tty"; if ((fd = open(dev, O_WRONLY)) < 0) perror(argv[0]); if (ioctl(fd, TIOCCONS, 0) < 0) { perror(argv[0]); exit(1); } exit(0); }