Fix a nasty temporary file race condition.
This commit is contained in:
parent
5c2f190c29
commit
8e4a6ca47d
|
@ -69,7 +69,6 @@ int setfiles(trf *phase) {
|
||||||
gr_cat(&pathname, "/Ack-XXXXXX");
|
gr_cat(&pathname, "/Ack-XXXXXX");
|
||||||
int fd = mkstemp(pathname.gr_string);
|
int fd = mkstemp(pathname.gr_string);
|
||||||
close(fd);
|
close(fd);
|
||||||
remove(pathname.gr_string);
|
|
||||||
out.p_keep=NO ;
|
out.p_keep=NO ;
|
||||||
} else {
|
} else {
|
||||||
if ( !p_basename ) {
|
if ( !p_basename ) {
|
||||||
|
|
|
@ -141,7 +141,6 @@ static void intrf(void) {
|
||||||
new->t_stdin= YES ;
|
new->t_stdin= YES ;
|
||||||
} else
|
} else
|
||||||
if ( strcmp(ty_name,STD_OUT)==0 ) {
|
if ( strcmp(ty_name,STD_OUT)==0 ) {
|
||||||
fprintf(stderr, "setting stdout for %s\n", new->t_name);
|
|
||||||
if ( new->t_stdout ) twice=YES ;
|
if ( new->t_stdout ) twice=YES ;
|
||||||
new->t_stdout= YES ;
|
new->t_stdout= YES ;
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in a new issue