REDUCE

21.6 Miscellaneous Features

It is a design goal to reduce the number of system calls which have to be linked in to the kernel to a minimum. The necessary information can be read elsewhere, e.g. through a pipe. For some example, see the chapter on pipes above.

Nevertheless, some system calls have be be linked in, because they handle process specific information which is not available to a spawned process.

The follwoing two system calls can be used to create unique file names.

(getpid):Integer expr
Returns the system specific number under which the PSL process is registered in the currently running system. If PSL is running under the control of a GUI, this number corresponds to the PSL process, not the GUI process,

(gethostid):any expr
The system and hardware dependent word (say), which identifies the processor is returned. It is normally a good idea to store this word in a place where the garbage collector will not come along, e.g. in a WARRAY.