Re: Stats collection on Windows

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Stats collection on Windows
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCEA35251@algol.sollentuna.se
обсуждение исходный текст
Ответ на Stats collection on Windows  ("Peter Brant" <Peter.Brant@wicourts.gov>)
Ответы Re: Stats collection on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> >> HANDLE is process local? That is worse then, because then
> there's no
> >> guarentee that each process will see a different identifier.
>
> > HANDLE is process local. What you need to do is run
> DuplicateHandle()
> > on it specifying it should "also be valid for process Y" (for which
> > you need a HANDLE opened, in this case the stats
> collector). This will
> > give you a new handle whichi s valid in the *target
> process*, but it
> > is *not* valid in your own process.
>
> What happens if process Y goes away between the time you
> obtain a handle for it and the time you try to run this
> DuplicateHandle call?

I don't know offhand. I would assume one of two things:
1) DuplicateHandle() fails.
2) You get a handle back that is valid in the dead process (meaning it's
not valid).

I can put together some quick test-code for this if you need me to?

//Magnus


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Tru64/Alpha problems
Следующее
От: "stephen joseph butler"
Дата:
Сообщение: Re: Stats collection on Windows