madhuneal / ppss

Automatically exported from code.google.com/p/ppss
0 stars 0 forks source link

exit-code from PPSS #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run ppss when somthing is "wrong" (e.g. empty work directory - no files to 
process, or maybe 100% of the jobs fail with non-zero exit-code)

2. when ppss completes echo $? (it will be 0)

3. ppps will may show [ ERROR ] on screen, but not in the exit-code.

What is the expected output? What do you see instead?

I'm using ppps from a higher level script (one that creates the files to be 
processed, sets the ppps_tmpdir etc, and runs ppps) and so it is vital for 
scripting to have a simple and reliable way to know when ppps "succeeded" or 
"failed". 

It would be more convenient for scripters to use the exit-code from ppss in a 
meaningful way. By that I mean that the calling script could rely on the 
exit-code from ppss to make intelligent decisions.

Currently it is a problem that ppss returne 0 even on errors.
It's not convenient to search the output text of ppss itself.

For example suppose that the exit-codes from ppss were something like these:

0: where 0 means "success" (all files processed without errors),

1:could mean "ppps processed all files but some jobs returned a non-zero exit 
code, so search the job_log directory for details"

2: could mean ppps failed to process any files due to some pps related error 
(setup / configuration / no files to process etc).

What version of the product are you using? On what operating system?
2.85

Please provide any additional information below.
I invoke ppss from a Korn-Shell script , on Red Hat Enterprise Linux.

Original issue reported on code.google.com by oreilly....@gmail.com on 13 Aug 2011 at 7:23

GoogleCodeExporter commented 9 years ago
I was sloppy and fixed some exit commands with the proper value. However, 
checking if processing of an item failed or not is a valuable but difficult 
thing. 

It is a good suggestion. It may be very complex to implement since inter 
process communication with the shell is a nightmare that makes the most rugged 
men cry.

Original comment by Louwrentius on 17 Aug 2011 at 10:39

GoogleCodeExporter commented 9 years ago
This feature request has been implemented in the upcoming version of PPSS 
(2.90). This version can be obtained in alfa-status from svn. 

The exit value represents the number of failed items. There is no distinction 
between general ppss errors and this number, one failed item is exit code 1. 
PPSS failing is always exit code 1. 

Original comment by Louwrentius on 21 Aug 2011 at 6:34