NAME

hipri - Run CGIBurn processes with high priority.


SYNOPSIS

CD burning is a realtime process; if the process which is writing to the CD gets behind, the CD will be destroyed. Because of this, it is important that these processes not get behind. To prevent this, we can try to give them higher priority than other processes, so that if they need to run, they will be allowed to preempt other processes.

Generally, hipri is not run directly. Instead, CGIBurn driver programs that need increased priority are symlinked to it. When it is run via a symlink, it raises its priority, then executes the real driver script.

If this is not the documentation you expected, try looking in the subdirectory named real.


DESCRIPTION

Only root is allowed to raise the priority (lower the niceness) of processes, so this utility must be installed SetUID to root.

hipri tries very hard to be very small and verifiable. It immediately raises its own priority, then sets its effective UID to the real UID that ran it. It then runs the high priority process, which will run with nonprivileged real and effective UID.

hipri uses Perl's builtin function setpriority to set its priority.

hipri is intended to be used by symlinking programs which should have increased priority to it. When it runs, it inspects the 0th argument (argv[0], or $0) to determine the name of the program that it should run. Then it looks in the subdirectory real to find the real program to execute, and it passes along exactly the same arguments that it received. This makes it pretty much transparent to driver modules whether a driver program is run with high priority.

For security, hipri will only run programs in the real subdirectory of the CGIBurn ``LIBBIN'' directory, normally cgi-lib/bin/real.


SEE ALSO

setpriority.