> You ([EMAIL PROTECTED]) write:
> >AFS commands (hope this isn't a trade secret :) do this:
> >    code = cmd_Dispatch(argc,argv);
> >    exit (code != 0);
> >We would surely appreciate:
> >    exit (cmd_Dispatch(argc,argv));
> >then our automated process could tell whether or not to retry

>       If I understand your question correctly, I don't think that
> will help.  But it is also not a problem.
>       The AFS error codes are longs, whereas exit codes are a byte.
> You'll just get the last byte, which probably won't help.

     Well, if the error codes are reasonably laid out (and since
     they went to the trouble of using "com_err", hopefully they
     will be), just the last byte should be enough to differentiate.

     After all, one would hope that, say, "pts removeuser", can't
     fail more than 256 different ways.

>       If you are just running programs, then using expect or perl
> and examining the error messages seems to be a simple approach.

     Yup, unfortunately people tend to change the text of error
     messages with regularity.  Heck, sometimes AFS even puts
     part of it on stdout and part on stderr (they may have
     fixed this one by now).

John

Reply via email to