some more progress.  at this point i don't seem to be getting back the standard out but the exit codes make sense for whatever kind of query I am running.