Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3c0f3c9

Browse files
committed
Just noticed that with -S switch, MyProcPid is permanently wrong in
postmaster, because it isn't updated after forking away from the terminal.Apparently it's not used anyplace in the postmaster ... but seems bestto make it show the correct PID ...
1 parent792b0f4 commit3c0f3c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.195 2000/11/2920:59:52 tgl Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.196 2000/11/2922:04:04 tgl Exp $
1515
*
1616
* NOTES
1717
*
@@ -679,7 +679,7 @@ pmdaemonize(int argc, char *argv[])
679679
pid_tpid;
680680

681681
pid=fork();
682-
if (pid==-1)
682+
if (pid==(pid_t)-1)
683683
{
684684
perror("Failed to fork postmaster");
685685
ExitPostmaster(1);
@@ -691,6 +691,8 @@ pmdaemonize(int argc, char *argv[])
691691
_exit(0);
692692
}
693693

694+
MyProcPid=getpid();/* reset MyProcPid to child */
695+
694696
/* GH: If there's no setsid(), we hopefully don't need silent mode.
695697
* Until there's a better solution.
696698
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp