On Mon, Nov 9, 2009 at 2:19 PM, John Mendenhall <j...@surfutopia.net> wrote: > I have several openbsd 4.4 boxes, all of which are running > spamd. I have a cron job which runs a script, which has the > following commands in it: >
Well, sort is obviously calling fwrite to write on stdout, which head reads. When head has had enough, it closes its input, which is from the pipe. fwrite then terminates with an EPIPE error, which sort is not (seemingly) handling properly. (Looks like it is calling warn(3) or err(3).) Maybe sort(3) is not complaining if isatty(fileno(stdout)). Only the source knows for sure. The mystery to me is why the error message does not appear when the pipe is run on a tty. (I can duplicate your error easily). To me this looks like normal operation. You seem to be getting the output you want, right? dave -- Caution, this account is hosted by gmail. Strangers scan the content of all mail transiting such accounts.