1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

Reduce open() calls. Replace fopen() calls with calls to fd.c functions.

This commit is contained in:
Bruce Momjian
1997-08-18 02:15:04 +00:00
parent eaae21fb4d
commit 022903f22e
11 changed files with 74 additions and 106 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.16 1997/08/12 22:53:46 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.17 1997/08/18 02:14:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -1663,7 +1663,7 @@ _bm_die(Oid dbId, Oid relId, int blkNo, int bufNo,
tb = &TraceBuf[cur];
if ((fp = fopen("/tmp/death_notice", "w")) == (FILE *) NULL)
if ((fp = AllocateFile("/tmp/death_notice", "w")) == NULL)
elog(FATAL, "buffer alloc trace error and can't open log file");
fprintf(fp, "buffer alloc trace detected the following error:\n\n");
@ -1728,7 +1728,7 @@ _bm_die(Oid dbId, Oid relId, int blkNo, int bufNo,
break;
}
fclose(fp);
FreeFile(fp);
kill(getpid(), SIGILL);
}