fjohnson/rotman — Issue #4: Cannot get reliable exit codes and clean up for Erin's scripts
Author: fjohnson
Created: 2011-11-23 15:59:49+00:00
State: open

Because Erin uses bash and does not check each and every output of the programs she calls, if a script encounters an error it will continue to execute resulting in a chain of hideous errors.

Here is a quick overview:

cannot get reliable exit codes from programs used inside scripts. for two reasons: 1) certain programs return improper error codes 2) ERR trap is used currently to catch programs return non 0 exit code. this trap does not take effect in certain scenarios (such as when a program is used in a pipeline? ie. prog1 | prog2 -> prog1 returns non 0 but no err code trap)

cannot easily restart scripts, programs do not clean up partial output on failure so if you restart program you will have left over outputs on last run on entry.