From 8e4a6ca47d75fb6f94d6a14d73a7416cbcc48027 Mon Sep 17 00:00:00 2001 From: David Given Date: Sun, 17 Jul 2022 13:00:18 +0200 Subject: [PATCH] Fix a nasty temporary file race condition. --- util/ack/files.c | 1 - util/ack/rmach.c | 1 - 2 files changed, 2 deletions(-) diff --git a/util/ack/files.c b/util/ack/files.c index 01a20c992..4890b4b8c 100644 --- a/util/ack/files.c +++ b/util/ack/files.c @@ -69,7 +69,6 @@ int setfiles(trf *phase) { gr_cat(&pathname, "/Ack-XXXXXX"); int fd = mkstemp(pathname.gr_string); close(fd); - remove(pathname.gr_string); out.p_keep=NO ; } else { if ( !p_basename ) { diff --git a/util/ack/rmach.c b/util/ack/rmach.c index 4d3e2b669..1a4cd03a1 100644 --- a/util/ack/rmach.c +++ b/util/ack/rmach.c @@ -141,7 +141,6 @@ static void intrf(void) { new->t_stdin= YES ; } else if ( strcmp(ty_name,STD_OUT)==0 ) { - fprintf(stderr, "setting stdout for %s\n", new->t_name); if ( new->t_stdout ) twice=YES ; new->t_stdout= YES ; } else