#!/bin/csh -f
#------------------------------------------------------------------------
#                          REVISION HISTORY                             -
#                                                                       -
#------------------------------------------------------------------------
#  MOD            PR                                                    -
# LEVEL   DATE   NUMBER
# ----- -------- ------  -------  ------------------------------------  -
#  000  05/27/97 33431   WMiller  Initial version                       -
#  001  11/13/97 34811   WMiller  Modify for new invocation method      -
#  002  02/20/98 35847   WMiller  Set redirections for noclobber        -
#  003  04/28/98 36608   WMiller  Passwords sent on command line        -
#  004  02/14/00 40674   WMiller  No log file option
#  005  05/01/00 41693_02 Heller  Don't fail if MSG_REPORT_LEVEL is not set
#  006  07/13/00 40985   WMiller  Move logfile creation downstream
#  007  05/25/04 50605   Sontag   Use -f, this wrapper needs no OPUS env
#  008  06/21/04 51503   Sontag   Do not discard startup errors to /dev/null
#  009  11/18/04 52048   Sontag   However, we must close the stdout/err pipes
#  010  01/14/05 52462   Sontag   Renamed to opus_submit.csh, change arg list
#------------------------------------------------------------------------
#
# Module:  opus_submit.csh
#
#------------------------------------------------------------------------
# DESCRIPTION:
#   This script serves as a disconnection point between opus_broker
#   and the process to be run; rsh waits for its command to complete, so
#   it cannot directly run the process (or else we double the number
#   of shells for each process). Instead, opus_broker rsh's this script
#   which in turn runs the selected process in the background, then 
#   returns immediately.
#
#*********************************************************************
#
set proc_name = $1     # process name
set path_file = $2     # full path specification for the path file
set time_stamp = $3    # PSTAT/log time stamp
set pass = $4          # password (optional)
#
#*********************************************************************
#
#   Run the process on the same node that this script is run on
#
#---------------------------------------------------------------------
opus_run_process.csh 0 $proc_name $path_file $time_stamp $pass >&! /dev/null &
#
#*********************************************************************
#
#   Exit
#
#---------------------------------------------------------------------
exit $status
#
