Help! (on ioctl system call)

Guy Harris guy at sun.uucp
Thu Jun 13 16:07:05 AEST 1985


>     I'm having problems with using the ioctl system call.

The problem is not with the "ioctl" system call but with the specific
"ioctl" call you're using, namely TIOCSPGRP.  If a process attempts to do a
TRIOCSPGRP on its control terminal and it isn't in the same process group as
the terminal, the process gets a SIGTTOU signal and stops (which is why the
state field of the "ps" reports T).

Moral: do the TIOCSPGRP first and then do the "setpgrp" on yourself second.

	Guy Harris



More information about the Comp.unix.wizards mailing list