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:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
/*
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user