procmail
[Top] [All Lists]

Re: varname=| construct broken?

2004-02-21 11:19:28
Alright, I have a new problem.  This is using v3.23pre provided by Bart.  The 
rc file is as follows:

-----
SHELL=/bin/sh
:0:/tmp/jjj
RESULTS=|/tmp/error
LOG="$RESULTS
"
-----
/tmp/error is a script that returns non-zero:
#! /bin/sh
echo "this is stdout"
/bin/false
-----
Yes, this particular program is useless but demonstrates the issue I have.
I only want one instance to run at once (too many bring my system
to its knees, I have found out.)  Hence, the need for locking.  Therefore,
I can't just say RESULTS=`/tmp/error`, I want to use a recipe to 
leverage locking.

When you run procmail </dev/null, you get no output.  

I can remove the lock file from the recipe and this works, but I need 
the lock file.  The problem also only seems to be when the program
invoked returns non-zero.

These assignment recipes seem really squirrelly to me.  I guess I will
have to write to a file and get the output from there.  Yuck.

Ian

-----Original Message-----
From: Dallman Ross [mailto:dman(_at_)nomotek(_dot_)com] 
Sent: Friday, February 20, 2004 3:38 PM
To: Ian Duplisse
Cc: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: varname=| construct broken?


On Fri, Feb 20, 2004 at 03:25:44PM -0700, Ian D. wrote:
So do you recommend that I don't use it at all?  If it appears to be 
working for me, then is it safe?  Are these "specific compiles" always 
broken, or just sometimes broken (unpredictably)?

I don't know the answer.  I'm not well enough trained in reading the source 
code to know for sure.  I use a private version that has been fixed.  Bart 
Schaefer offered his for general use as well.

As for variable scoping, try this.  I get "MYVAR is foo".  Notice the 
"Forking" line.  I think any variables set by a child won't be seen by 
the parent, if typical UNIX fork() mechanisms are used.

Yes, you are correct, as Bart also pointed out just now.  I hadn't paid close 
enough attention to your original contextual statements. Sorry about that.


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