1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

getpid/pid cleanup

This commit is contained in:
Bruce Momjian
1998-01-25 05:15:15 +00:00
parent fc75484550
commit c16ebb0f67
16 changed files with 61 additions and 102 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.24 1998/01/07 21:06:23 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.25 1998/01/25 05:14:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -177,7 +177,7 @@ elog(int lev, const char *fmt,...)
ProcReleaseSpins(NULL); /* get rid of spinlocks we hold */
if (!InError)
{
kill(getpid(), 1); /* abort to traffic cop */
kill(MyProcPid, 1); /* abort to traffic cop */
pause();
}
@@ -257,7 +257,7 @@ DebugFileOpen(void)
if (fcntl(fd, F_GETFD, 0) < 0)
{
sprintf(OutputFileName, "%s/pg.errors.%d",
DataDir, (int) getpid());
DataDir, (int) MyProcPid);
fd = open(OutputFileName, O_CREAT | O_APPEND | O_WRONLY, 0666);
}
if (fd < 0)

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.17 1997/11/24 05:09:13 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.18 1998/01/25 05:14:42 momjian Exp $
*
* NOTES
* Globals used all over the place should be declared here and not
@@ -39,7 +39,8 @@ int Portfd = -1;
int Noversion = 0;
int Quiet = 1;
int MasterPid;
int MyProcPid;
char *DataDir;
/*

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.32 1998/01/15 19:46:10 pgsql Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.33 1998/01/25 05:14:49 momjian Exp $
*
* NOTES
* Sorts the first relation into the second relation.
@@ -988,7 +988,7 @@ gettape()
tp = (struct tapelst *) palloc((unsigned) sizeof(struct tapelst));
sprintf(uniqueName, "%spg_psort.%d.%d", TEMPDIR, (int) getpid(), uniqueFileId);
sprintf(uniqueName, "%spg_psort.%d.%d", TEMPDIR, (int) MyProcPid, uniqueFileId);
uniqueFileId++;
tapeinit = 1;