Please enable JavaScript to view this site.

A-Shell Reference

The –cgi switch invokes a number of features which simplify the use of A-Shell and CGI (Common Gateway Interface) or web programming. One feature of the –cgi switch is an automatic 7 second inactivity timeout. CGI processes should be quick, usually completing in less than a second, but in any case there wouldn’t be any purpose in the process being inactive this long.

More importantly -cgi swaps stdout and stderr so that normal screen output goes to stderr instead of stdout. The purpose of this seemingly senseless trick is to allow your CGI programs to continue to use PRINT statements (possibly for debugging, or possibly because you were converting a normal program to CGI use and didn’t get rid of all the PRINT statements) without interfering with the web output. By sending such output to the stderr channel, not only does it stay out of the way of the web page but it can also be redirected to a file (convenient for debugging.) In order to output to the new web page, you must then use CGIUTL.

Stdout and stderr refer to the "standard output" and "standard error output" streams of Unix programs. See the subroutine CGIUTL and the section on web programming for more details.