Re: SIGPIPE in src/view.c



Hello Roland,

On Sun, 2004-09-26 at 19:11, Leonard den Ottolander wrote:
> Some simple testing shows this fixes the broken pipe warning for some gz
> files but not others. Size seems to be an issue, ie works for small
> files (say a few KB compressed), but not for larger files (say a few
> dozen KB).

At second look the fix doesn't change any behaviour. The broken pipe
doesn't happen on small gzipped files anyway.

The patch you suggested last night:

--- src/ext.c.000	2004-09-26 00:02:14.000000000 +0200
+++ src/ext.c	2004-09-28 02:23:18.000000000 +0200
@@ -107,6 +107,7 @@ exec_extension (const char *filename, co
     }
     cmd_file = fdopen (cmd_file_fd, "w");
     fputs ("#! /bin/sh\n", cmd_file);
+    fputs ("trap 'exit 0' PIPE\n", cmd_file);
 
     prompt[0] = 0;
     for (; *data && *data != '\n'; data++) {

does indeed change the behaviour somewhat. Instead of a:
Warning
mc-proski/mcextery93a: line 2:  4118 Broken pipe             gzip -dc 
HardImage1.gz 2>/dev

I now just see:
Warning
Broken pipe

I still think this should be fixed below the fixme in get_byte(). Not
sure though.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research





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