Stop trying to remove core dumps.

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.
This commit is contained in:
George Koehler 2016-11-15 11:58:13 -05:00
parent 07b04c64c8
commit 486c516242
2 changed files with 1 additions and 3 deletions

View 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.

View 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 ;