Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!ugle.unit.no!kth.se!hemuli.tik.vtt.fi!tik.vtt.fi!tml From: tml@tik.vtt.fi (Tor Lillqvist) Newsgroups: comp.sys.hp Subject: Re: Need help for TIOCNOTTY on HP9K400 Message-ID: Date: 6 Feb 91 13:59:40 GMT References: <1991Feb5.201415.22555@polyof.poly.edu> Sender: news@hemuli.tik.vtt.fi Organization: Technical Research Centre of Finland, Laboratory for Information Processing (VTT/TIK) Lines: 25 In-reply-to: rocky@polyof.poly.edu's message of 5 Feb 91 20:14:15 GMT In article <1991Feb5.201415.22555@polyof.poly.edu> rocky@polyof.poly.edu (A1 rocky shiotsuki (staff) ) writes: I need to compile a program on HP 9000 Series 400 which use TIOCNOTTY. In the file /usr/include/sys/ioctl.h, a TIOCNOTTY is defined as followed: #ifdef __hp9000s800 /* * tty ioctl commands */ #ifdef notdef #define TIOCNOTTY _IO('t', 113) /* void tty association */ #endif /* notdef */ So, On Series 800, a TIOCNOTTY is defined, but not Series 400. No it isn't defined on s800. Note the #ifdef notdef. Anyway, to get the desired effect (detach from controlling terminal), use the setsid() system call. Then do signal(SIGHUP, SIG_IGN) and fork(), and continue in the child, or else you might acquire a new controlling terminal if and when you happen to open a terminal device file. -- Tor Lillqvist, working, but not speaking, for the Technical Research Centre of Finland