When using the C shell, or any other shell which runs a script every time the shell is started, the script may get run several times. In the worst case, the script may get run
three times: By rsh, to run rstartd By rstartd, to run the specified command By the command, eg xterm rstartd currently limits lines, both from config files and requests, to BUFSIZ bytes.DETACH is implemented by redirecting file descriptors 0,1, and 2 to /dev/null and forking before executing the program.
CMD is implemented by invoking $SHELL (default /bin/sh) with "-c" and the specified command as arguments.
POSIX-UMASK is implemented in the obvious way.
The authorization programs are run in the same context as the target program - same environment variables, path, etc. Long term this might be a problem.
In the X context, GENERIC-CMD Terminal runs xterm. In the OpenWindows context, GENERIC-CMD Terminal runs cmdtool.
In the X context, GENERIC-CMD LoadMonitor runs xload. In the OpenWindows context, GENERIC-CMD LoadMonitor runs perfmeter.
GENERIC-CMD ListContexts lists the contents of @List in both the system-wide and per-user contexts directories. It is available in all contexts.
GENERIC-CMD ListGenericCommands lists the contents of @List in the system-wide and per-user commands directories, including the per-context subdirectories for the current context. It is available in all contexts.
CONTEXT None is not implemented.
CONTEXT Default is really dull.
For installation ease, the "contexts" directory in the distribution contains a file "@Aliases" which lists a context name and aliases for that context. This file is used to make symlinks in the contexts and commands directories.
All MISC values are passed unmodified as environment variables.
One can mistreat rstartd in any number of ways, resulting in anything from stupid behavior to core dumps. Other than by explicitly running programs I don't think it can write or delete any files, but there's no guarantee of that. The important thing is that (a) it probably won't do anything REALLY stupid and (b) it runs with the user's permissions, so it can't do anything catastrophic.
@List files need not be complete; contexts or commands which are dull or which need not or should not be advertised need not be listed. In particular, per-user @List files should not list things which are in the system-wide @List files. In the future, perhaps ListContexts and ListGenericCommands will automatically suppress lines from the system-wide files when there are per-user replacements for those lines.
Error handling is OK to weak. In particular, no attempt is made to properly report errors on the exec itself. (Perversely, exec errors could be reliably reported when detaching, but not when passing the stdin/out socket to the app.)
If compiled with -DODT1_DISPLAY_HACK, rstartd will work around a bug in SCO ODT version 1. (1.1?) (The bug is that the X clients are all compiled with a bad library that doesn't know how to look host names up using DNS. The fix is to look up a host name in $DISPLAY and substitute an IP address.) This is a trivial example of an incompatibility that rstart can hide.