procmail
[Top] [All Lists]

Re: Counting lines / `w' with `f'

2000-02-27 12:51:32
On 27 February 2000, Philip Guenther <guenther(_at_)gac(_dot_)edu> wrote:
Liviu Daia <Liviu(_dot_)Daia(_at_)imar(_dot_)ro> writes:

                     |  with "w" or "W"     |  without "w" or "W"
   ------------------+----------------------+----------------------
   non-zero          |  recovers the        |  happily keeps the
   return code       |  unfiltered message  |  filtered message
   ------------------+----------------------+----------------------
   calling Procmail  |  recovers the        |  recovers the
   receives SIGPIPE  |  unfiltered message  |  unfiltered message 
   ------------------+----------------------+----------------------
   crash after       |  recovers the        |  recovers the
   consuming the     |  unfiltered message  |  unfiltered message
   input             |                      |


   So the only situation when Procmail keeps a possibly invalid
result is when the calling recipe doesn't have an "w" or "W" flag,
and the filter finishes normally but with a non-zero return code.

What do you mean by "crash after consuming the input"?

    Any abnormal death, f.i. from a signal.  Should it die before it
gets to read all the input, the calling Procmail would get a SIGPIPE...

When a program dies from a signal (say, SEGV) the parent only finds
out if it checks the exit status.

    Exit status != return code.  What exactly happens if you leave out
the "w" and "W" flags?  Procmail simply produces a zombie?  Or it does a
fork + setsid in order to avoid the zombie?

So, that bottom right-hand box should be "happily keeps the filtered
message".

    Sorry, but I wouldn't have dreamed that in my worst nightmares.
This is rotten.  What's the point in having a flag if it's never safe to
leave it out?

    Regards,

    Liviu Daia

-- 
Dr. Liviu Daia               e-mail:   Liviu(_dot_)Daia(_at_)imar(_dot_)ro
Institute of Mathematics     web page: http://www.imar.ro/~daia
of the Romanian Academy      PGP key:  http://www.imar.ro/~daia/daia.asc

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