Stop trying to remove core dumps.
authorGeorge Koehler <xkernigh@netscape.net>
Tue, 15 Nov 2016 16:58:13 +0000 (11:58 -0500)
committerGeorge Koehler <xkernigh@netscape.net>
Tue, 15 Nov 2016 16:58:13 +0000 (11:58 -0500)
unlink("core") doesn't work with OpenBSD, where core dumps have names
like "ncg.core".  Users who don't want core dumps can turn them off
with "ulimit -c 0" in sh(1).  Then the system doesn't write a core
dump.  That's better than writing core then unlinking it.

util/ack/ack.1.X
util/ack/run.c

index 689992a..1e35bca 100644 (file)
@@ -100,7 +100,7 @@ Note: \fIack\fP refuses to overwrite argument \fI.e\fP files.
 .IP \-t
 Preserve all intermediate files.
 If two \fB\-t\fP are used,
-\fIack\fP also preserves core dumps and output of failed transformations.
+\fIack\fP also preserves output of failed transformations.
 
 .IP \-w
 Suppress all warning messages.
index ed88d66..32cb59f 100644 (file)
@@ -87,8 +87,6 @@ static int run_exec(trf *phase, const char *prog) {
                        }
                } while ( waitchild!=child) ;
                if ( status ) {
-                       if ( status&0200 && (status&0177)!=SIGQUIT &&
-                               t_flag<=1 ) unlink("core") ;
                        switch ( status&0177 ) {
                        case 0 :
                                break ;