[pgsql-jp: 34502] Re: Cygwin+PostgreSQLでWindows ハンドルの開放漏れ?
tomson
tomson_lpcjp @ yahoo.co.jp
2004年 12月 20日 (月) 23:19:46 JST
関係ないとは思いますが、
postmaster.cの、1092-1106行目付近に、gettimeofday()が使ってあります。
大丈夫でしょうか。
cygwinの場合、システム時間やタイムゾーンの情報はどこから来るのでしょうか。
while (random_seed == 0)
{
gettimeofday(&later, &tz);
/*
* We are not sure how much precision is in tv_usec, so we
* swap the nibbles of 'later' and XOR them with 'now'. On the
* off chance that the result is 0, we loop until it isn't.
*/
random_seed = now.tv_usec ^
((later.tv_usec << 16) |
((later.tv_usec >> 16) & 0xffff));
}
その下の、1110-1135行です。
/*
* New connection pending on any of our sockets? If so, fork a
* child process to deal with it.
*/
for (i = 0; i < MAXLISTEN; i++)
{
if (ListenSocket[i] == -1)
break;
if (FD_ISSET(ListenSocket[i], &rmask))
{
port = ConnCreate(ListenSocket[i]);
if (port)
{
BackendStartup(port);
/*
* We no longer need the open socket or port structure
* in this process
*/
StreamClose(port->sock);
ConnFree(port);
}
}
}
コレクターのステータスが失われていたら、新しいのをもう一つ、スタートする、と書いてあります。
/* If we have lost the stats collector, try to start a new one */
if (!pgstat_is_running)
pgstat_start();
------------------------------------------------------------
Hanrin Keisin Email tomson_lpcjp @ yahoo.co.jp
pgsql-jp メーリングリストの案内