mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
Should not try to unlink stdout.
This commit is contained in:
@ -2203,4 +2203,9 @@ Sun, 27 May 2007 13:14:39 +0200
|
|||||||
|
|
||||||
- Changed variable test to not run into infinite loops on backend
|
- Changed variable test to not run into infinite loops on backend
|
||||||
errors.
|
errors.
|
||||||
|
|
||||||
|
Mon, 11 Jun 2007 13:59:57 +0200
|
||||||
|
|
||||||
|
- Fixed memory leak in descriptor code.
|
||||||
|
- Made ecpg delete output file in case of an error.
|
||||||
- Set ecpg version to 4.3.1.
|
- Set ecpg version to 4.3.1.
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.344 2007/06/11 11:52:08 meskes Exp $ */
|
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.345 2007/06/11 12:01:23 meskes Exp $ */
|
||||||
|
|
||||||
/* Copyright comment */
|
/* Copyright comment */
|
||||||
%{
|
%{
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
/* Location tracking support --- simpler than bison's default */
|
/* Location tracking support --- simpler than bison's default */
|
||||||
#define YYLLOC_DEFAULT(Current, Rhs, N) \
|
#define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||||
@ -101,8 +102,8 @@ mmerror(int error_code, enum errortype type, char * error, ...)
|
|||||||
case ET_FATAL:
|
case ET_FATAL:
|
||||||
fclose(yyin);
|
fclose(yyin);
|
||||||
fclose(yyout);
|
fclose(yyout);
|
||||||
if (unlink(output_filename) != 0)
|
if (unlink(output_filename) != 0 && *output_filename != '-')
|
||||||
fprintf(stderr, "Could not remove ourput file %s!\n", output_filename);
|
fprintf(stderr, "Could not remove output file %s!\n", output_filename);
|
||||||
exit(error_code);
|
exit(error_code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user