iTP Secure WebServer System Administrators Guide (Version 7.5+)
Table 17 Pathway Specific Environment Variables (continued)
DescriptionEnvironment Variable
Serverpath {Env
TANDEM_CGI_FFLUSH_TIMER=value}
The valid values for this variable are from 0 to 3600. The
default value, 0, causes the CGI process to retain buffered
data until the buffer is full. Any other value causes the
process to wait the specified number of seconds before
flushing the buffer.
Example:
Server /dir5/flush.pway {Env
TANDEM_CGI_FFLUSH_TIMER=1}
The flush timer uses an OSS signal handling routine that
catches a SIGALARM signal. When the alarm signal is
delivered to a process, it can interrupt long I/O operations
and cause an error. In this case, the errno variable is set
to 4004 (interrupted system call).
If you want your program to do its own SIGALARM
processing, set the value of TANDEM_CGI_FFLUSH_TIMER
to 0.
This environment variable maps the current working
directory to the CGI script directory when its value is set
to YES.
Format:
TANDEM_CGI_ RELATIVE_PATH_ SUPPORT
Server path {
Env TANDEM_CGI_RELATIVE_PATH_SUPPORT=value}
The valid values for this variable are YES/yes and NO/no.
The default value, NO, causes the current working directory
to be mapped to the directory specified by the CWD
attributes of the server directive. If a directory is not
specified by the CWD attributes, the current working
directory, by default, will be mapped to the directory in
which the generic-cgi.pway is located.
Example:
Server $root/bin/generic-cgi.pway {
Eval $DefaultServerAttributes
Env TANDEM_CGI_RELATIVE_PATH_SUPPORT=YES}
Generic CGI will move the current working directory to the
location of the script file. You can specify a relative path
inside a cgi script by using this feature.
1
When AUTOMATIC_FORM_DECODING is used, only the last value in a multiple selection will be returned if the POST
method is used along with the multiple tag. To see all values, use the GET method and the QUERY_STRING variable.
Table 18 Environment Variable Access Methods
Variable Access MethodLanguage
This access method makes a getenv library call
Format:
C/C++
#include stdlib.h
char *variable =
getenv("environment_variable_name")
Example:
char *sname=getenv("SERVER_NAME")
This access method accesses an environment variable
Format:
Tcl
$env(environment_variable_name)
Example:
152 Using Common Gateway Interface (CGI) Programs










