bug#23031: reporting write errors and handling SIGPIPE

2016-03-19 Thread Paul Eggert
On 03/16/2016 09:14 AM, Assaf Gordon wrote: Attached is a patch that adds errno information to 'write error' messages Thanks, I installed the attached somewhat-tweaked version of that. Among other things I renamed the new static functions to avoid confusion with existing "safer" functions.

bug#23031: reporting write errors and handling SIGPIPE

2016-03-19 Thread Paul Eggert
On 03/16/2016 09:14 AM, Assaf Gordon wrote: write(1, "2\n", 2) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=2893, si_uid=1004} --- write(2, "./src/grep: ", 12)= 12 Although this looks weird and it's not what I would exp

bug#23031: reporting write errors and handling SIGPIPE

2016-03-19 Thread Assaf Gordon
Hello, On 03/17/2016 02:49 PM, Paul Eggert wrote: On 03/16/2016 09:14 AM, Assaf Gordon wrote: Attached is a patch that adds errno information to 'write error' messages Thanks, I installed the attached somewhat-tweaked version of that. Among other things I renamed the new static functions to

bug#23052: Make grep be able to separate output by NULL characters?

2016-03-19 Thread Paul Eggert
On 03/18/2016 02:20 AM, Chiel ten Brinke wrote: Suppose we are doing a multiline regex pattern search on a bunch of files and we want to extract the matches, e.g. for further processing. By default, grep outputs matches separated by newlines, but since we are doing multiline patterns this creates