procmail
[Top] [All Lists]

Re: exit codes, TRAP, etc.

2004-04-14 09:05:14
Hmm, I sent this a few minutes ago and it bounced.  Will try again.

David Tamkin wrote:

Here's a thought:

INCLUDERC=wherever
exitcode=$?

:0
* $ $exitcode^0
{ LOG = "${NL}EXITCODE of $INCLUDERC was $exitcode.$NL" }

and don't mess with the real $EXITCODE at all.


I had thought of essentially that first thing, and liked
it; but unfortunately, it does not seem to work, at least
under my testing.  I cannot find a simple way to see if
an INCLUDERC didn't execute, other than testing for something
that could only have happened inside the INCLUDERC.
If there is a cleaner way, I'd like to know it.


 INCLUDERC = bogus
 MYEXIT = $?

 LOG = "$NL MYEXIT was $MYEXIT $NL"

 procmail: Assigning "INCLUDERC=bogus"
 procmail: Couldn't read "bogus"
 procmail: Assigning "MYEXIT=0"
 procmail: Assigning "LOG=
 MYEXIT was 0 
"

 MYEXIT was 0 

-- 
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>