[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Procmail: "Error while writing to..." bash script

My .procmailrc pipes certain messages to a bash script that just certain 
sound files based on the arguments passed.  The script doesn't read 

I noticed lots of "Error while writing to..." in the procmaillog, and 
the manpage says this means can't write to file or pipe terminated 

So, I added a "cat - > /dev/null" line to the script and the errors 
stopped.  I have two questions:

(1) Can I count on procmail always writing at least one byte to my stdin 
so the script won't hang?

(2) Can you think of a more elegant solution to "throw away" all of 
stdin without hanging if its empty?

Reply to: