Re: [dwm] broken pipes

From: Jukka Salmi <j+dwm_AT_2006.salmi.ch>
Date: Sun, 26 Nov 2006 18:54:39 +0100

Hi,

Manuel Badzong --> dwm (2006-11-26 15:19:58 +0100):
> I tried several inputs (empty lines, lines with multiple '\n', all '\n'
> lines). The following patch would handle all of them correctly. Though
> I 'm not sure if this is really necessary (but it remains one line of
> code).

I'm not sure whether dwm really should try that hard to fix the input
it is given...

However, to continue the tradition of patching the patches patch I've
attached a patch. It

- '\0'-terminates the error message if read() failed (just in case
  strlen(strerror(errno)) >= sizeof stext - 1)
- saves 1020 bytes from being zeroed unnecessarily (performance! ;-))

Cheers, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~

Received on Sun Nov 26 2006 - 18:54:40 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:32:47 UTC