TIOCNOTTY under SCO System V/386

Tim Wright tim at dell.co.uk
Sat Jun 22 02:59:14 AEST 1991


In <54 at jeanluc.UUCP> stockett at 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 at 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



More information about the Comp.unix.sysv386 mailing list