Berkeley Job Control on Hewlett-Packard

Bob Lenk rml at hpfcdc.HP.COM
Tue Jan 16 04:45:32 AEST 1990


In <1990Jan8.203600.6950 at granite.cr.bull.com>
freedman at granite.cr.bull.com (Jerome Freedman) writes:

>	Specifically, I wish to use the following system calls:
>
>		ioctl(0, TIOCSPGRP, &pid)
>		kill(pid, SIGSTOP);
>		kill(pid, SIGCONT);
>
>Any ideas on why these calls seem to behave differently on the HP than on other
>systems?

Most likely the difference is that BSD permits any process that has a
terminal open to perform TIOCSPGRP, while HP-UX imposes some security
restrictions based on the caller and the target process group ID.  The
exact nature of the checks is documented under termio(7).  In the 7.0
release these checks are the same as for the POSIX tcsetpgrp() call; in
earlier releases they had a similar intent but were somewhat different.
It would not surprise me if other implementations impose similar
restrictions when they conform to POSIX (or when they beef up security).

Note also that the setpgrp() and getpgrp() calls are different from BSD.
If the program is linked with -lBSD there are calls which are
syntactically the same and semantically similar, but they also impose
more security checks than the BSD versions (the setpgrp2() and
getpgrp2() calls in libc are the same calls with names that don't
conflict with System V).

If by any chance the system is a series 300 earlier than release 6.5,
job control is not supported at all.  On those systems the above calls
should fail to compile because the constants used are not #defined.

		Bob Lenk
		rml at hpfcla.hp.com
		hplabs!hpfcla!rml



More information about the Comp.unix.questions mailing list