Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!usc!apple!olivea!mintaka!bloom-beacon!sunbim.be!db From: db@sunbim.be (Danny Backx) Newsgroups: comp.windows.x Subject: XView problem fix [was: OpenWindows shelltool/cmdtool under X-terminal] Message-ID: <9010241320.AA00818@sunbim.be> Date: 24 Oct 90 12:23:09 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 46 There have been several messages about the shelltool/cmdtool problem on X-terminals. There are 2 solutions. 1. Use /usr/etc/setsid. This involves making a little script that replaces your executable, and actually calls it. E.g. : #!/bin/csh -f /usr/etc/setsid -b /home/openwin/bin/xview/cmdtool $* [ this is actually Sun's solution - proposed for others than this also] 2. Fix the bug. The bug is not in cmdtool or shelltool, rather in XView. It can be found in ${XVIEWSRC}/lib/libxvol/ttysw/tty_init.c . I changed the stuff around line 580 to look like this : gotpty: line[strlen("/dev/")] = 't'; #ifdef POSIX (void) setsid(); /* For SunOS 4.1 */ #else tt = open("/dev/tty", O_RDWR); if (tt > 0) { (void) ioctl(tt, TIOCNOTTY, 0); (void) close(tt); } #endif tty = open(line, O_RDWR); You would have to compile with -DPOSIX in order to get this to work. Note: read SunOS 4.1 Release Manual (pp. 52-54). Danny Backx BIM Networks System Engineer E-Mail: db@sunbim.be (or uunet!mcsun!ub4b!sunbim!db) Telephone: +32(2)759.59.25 Fax : +32(2)759.47.95 Postal Mail : Danny Backx BIM Kwikstraat 4 3078 Everberg Belgium