Question on how to implement exclusive scheduling
Chris Torek
chris at umcp-cs.UUCP
Wed Oct 17 12:31:04 AEST 1984
Note, however, that implementing arbitrary mandatory locking is not
a good idea as anyone can then write something like this:
#include <signal.h>
main() {
int fd, i;
for (i = 0; i < 31; i++)
(void) signal(i, SIG_IGN);
fd = open("/etc/passwd", 0);
lockf(fd, -1); /* lock it to EOF */
pause(); /* or, for(;;); is even more malicious */
}
If there are no system administrators already logged in you may
have to halt the machine from the console.
There are numerous ways around this, the easiest probably being to
use advisory locks rather than mandatory locks.
--
(This mind accidently left blank.)
In-Real-Life: Chris Torek, Univ of MD Comp Sci (301) 454-7690
UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at maryland
More information about the Comp.unix.wizards
mailing list