The Job Execution Control starts the shell to interpret the shell scripts of the job. The Job Execution Control reads the following shell startup file as if it has logged in.
/etc/profile and .profile of the job owner's home directory
/etc/.login and .login and .cshrc of the job owner's home directory
(The job submitter's login shell can be confirmed by password entry.)
A controlling terminal can be secured by usual login. However, the controlling terminal cannot be secured by the Job Execution Control, because the job executed from the Job Execution Control can work as the child and grandchild process of the Job Execution Control daemon; namely the job works as the process not having the controlling terminal. If commands (*) in the startup file that require the controlling terminal are executed, jobs may not work correctly. Most of the time, commands that require the controlling terminal can be unconditionally executed if the startup file has been used without editing since the operating system was installed. Therefore, the startup file must be edited before job submission.
*) Some of the relevant commands that define terminal attributes and read inputs made from the terminal are listed below:
Example: ttytype, stty, tset, tty, eucset, script
When the Job Execution Control executes a job, the environment variable ENVIRONMENT is set to "BATCH" at job startup. Therefore, when the environment variable ENVIRONMENT in the startup file has a value, the startup file must be edited so that processes requiring the controlling terminal or the control of controlling terminal should not be executed.
The following provides an example of editing .profile and .login.
Example of editing .profile
: : if [ "$ENVIRONMENT" = "" ] then stty erase '^H' intr ' ^C' fi : :
Changing ".login" (Example):
: : if ( $?ENVIRONMENT == 0 ) then stty erase '^H' intr ' ^C' endif : :