-----BEGIN PGP SIGNED MESSAGE-----
How does procmail determine that a program has failed when using the "w"
switch, as in
:0w
|false
?
My particular case involves more complex commands than "false" -- these
commands are outputting stuff to stderr. My recipe is:
:0w
*^x-command:
|sh -c "`formail -x x-command`"
where this is in the header
x-command: /bin/kill -TERM 27880 || /bin/rm /usr/spool/mail/foo.bar.27880 ;
test $? != 0
Both /bin/kill and /bin/rm do seem to fail since they both output errors
to stderr.
So, I guess my question is: when a program outputs stuff to stderr, does
this indicate an error?
- --
Internet: dummy(_at_)c2(_dot_)org In real life: Robert Brown,
URL: http://www.c2.org/~dummy in sunny Berkeley, CA
Those who seek easy answers get final solutions. << waiting for The Big One
>> Leonardo da Vinci didn't eat meat. << (510) 464-4604
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
iQB1AwUBMa376TZMMbnCKCB9AQHe8gMAweqbDNkMWD6mD7alJkvAWBbEH9pkCYGV
3gv6+XAqMsdtrgSI3vtxYUqYZeH4ZpIcJDPOifyrIr1+FrJ7y59rYVnlm70FADKV
Fyl/PtKc+4S9ZE7gfNZwznQ4lnxa+oGI
=GxWn
-----END PGP SIGNATURE-----