The Question is:
When running a detached process I use the command line below where exe_name is
LOGINOUT.EXE so the process can perform spawn commands. The problem I have is
that I the output file cannot be closed by the process thus I am getting very
large output files.
When I run a process where the exe_name is not
LOGINOUT.EXE the process has control of it's output file. What is the any
reason for this any is there any cure?
$ RUN 'exe_name' -
/PROCESS_NAME = 'proc_name' -
/INPUT = 'input_name' -
/OUTPUT = 'output_name' -
/ERROR = 'error_name' -
/WORKING_SET = 'working_set -
/MAXIMUM_WORKING_SET = 'maximum_working_set -
/EXTENT = 'extent -
/AST_LIMIT = 'ast_limit -
/BUFFER_LIMIT = 'buffer_limit -
/ENQUEUE_LIMIT = 'enqueue_limit -
/FILE_LIMIT = 'file_limit -
/IO_BUFFERED = 'io_buffered -
/IO_DIRECT = 'io_direct -
/PAGE_FILE = 'page_file -
/QUEUE_LIMIT = 'queue_limit -
/SUBPROCESS_LIMIT = 'subprocess_limit -
/PRIORITY = 'priority -
/PRIVILEGES = ('proc_privs')
The Answer is :
You will find that your actions are causing the process to write to the
logfile, hence you will see the logfiles increasing in size.
If your application was to open and maintain a logfile -- and this is
nearly identical to a batch logfile -- as is done within the LOGINOUT
image, you would see the same behaviour as you report here.
If you wish to perform SPAWN commands without a CLI present -- with
additional details in the OpenVMS FAQ around the NOCLI error -- you
will want to use the $creprc system service and not the lib$spawn or
C system call.
For information on maintaining an output file that can be accessed
by other users (opening a file for shared access), please see the