[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] validating exit codes



Alex, you might wrap the call to your legacy executable in a  wrapper shell script, capture the exit code in the shell script and exit 0 from the shell script if the legacy code exits with 1 or 0.
 
something like this:
 
#!/bin/bash
# wrapper.bash
legacy.exe $@
legacyExitCode=$?
if [  0 = $legacyExitCode ] || [ 1 = $legacyExitCode ]
then
  exit 0   # legacy exit code is ok if zero or one
fi
exit $legacyExitCode
 
----------------------
And your submit file, something like this
 
Universe = vanilla
Executable = wrapper.bash
Arguments=  legacyArg1 legacyArg2 legacyArg3                   
transfer_input_files = legacy.exe , otherFilesNeeded
should_transfer_files=YES
when_to_transfer_output = ON_EXIT
Log = file.log
Output = out.txt
Error = error.log
Queue
On Wed, Apr 21, 2010 at 3:15 PM, Alas, Alex [FEDI] <aalas@xxxxxxxxxxxxx> wrote:

Greeting to all,

In our environment we have some legacy software that when run on condor it exit using code 1, even though the process finish correctly. Currently we have the error notification enable at the submit file so my users receive e-mails of failed jobs when they run that legacy process. Is there a way to validate two exit codes (o and 1) ?

 

Alex Alas

Fugro EarthData Inc.


_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/condor-users/