Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!axion!delluk!holly!tim From: tim@dell.co.uk (Tim Wright) Newsgroups: comp.unix.sysv386 Subject: Re: TIOCNOTTY under SCO System V/386 Keywords: TIOCNOTTY Message-ID: Date: 21 Jun 91 16:59:14 GMT References: <54@jeanluc.UUCP> Sender: usenet@delluk.uucp (Usenet posting login) Organization: Dell Computer Corp., Bracknell, UK Lines: 27 In <54@jeanluc.UUCP> stockett@jeanluc.UUCP (Jeffrey M. Stockett) writes: >I'm trying to port over some code from a BSD machine to SCO System V/386, >and I have run into a problem with the following lines: > if ((s = open("/dev/tty", O_RDWR)) >= 0) { > ioctl(s, TIOCNOTTY, 0); > close(s); > } >I have grepped for TIOCNOTTY in /usr/include/*.h and /usr/include/sys/*.h, >and it is not to be found. Does anyone know why it is missing, and >what would be an appropriate substitute for it under SCO System V/386? >(This is the only line that causes a problem. If I define it to some >bogus value, the rest of the code compiles fine.) Yup, under most System V's it translates simply to setpgrp(); If you're POSIX compatible, you may prefer to use setsid(); Tim -- Tim Wright, Dell Computer Corp., Bracknell | Domain: tim@dell.co.uk Berkshire, UK, RG12 1RW. Tel: +44-344-860456 | Uucp: ...!ukc!delluk!tim Smoke me a Kipper, I'll be back for breakfast - Red Dwarf