This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygipc (and PostgreSQL) XP problem resolved!

On Sun, May 11, 2003 at 11:54:48AM +1000, Robert Collins wrote:
>On Sun, 2003-05-11 at 11:46, Christopher Faylor wrote:
>> On Sun, May 11, 2003 at 11:41:49AM +1000, Robert Collins wrote:
>> >On Sun, 2003-05-11 at 11:23, Christopher Faylor wrote:
>> >> Or we can just use Global atoms, as I suggested in cygwin-developers.
>> >
>> >IIRC Global atoms are not global these days - they are global within a
>> >single login at a time. I can't comment further without looking into the
>> >ftok spec again, which I don't have time for right now...
>> If that is really true, that would defeat the purpose of a global atom.
>Not at all. From memory: Global Atoms come from before multi-user
>kernels in the windows world. They are used for things like registering
>clipboard types - which are *not* meant to cross user boundaries.

I thought that global atoms were used for much more than just
registering clipboard types.  The MSDN documentation says they are
"unique throughout the system".

However, this discussion is pointless since it is easy enough to write a
program to check.


Strangely, if I login via ssh GlobalAddAtom/GlobalFindAtom provide the
same value regardless of user.  On the console, with multiple logins,
The value changes depending on the user.  I suppose that is due to the
fact that Windows thinks that the ssh service is "one session".

So, you appear to be right that global atoms relate to login sessions.

>>>I can't comment further without looking into the ftok spec again, which
>>>I don't have time for right now...
>>I'm not sure what ftok has to do with whether global atoms are global
>>or not, however.
>ftok creates keys for use in IPC programs.  They often need to cross
>user boundaries - similar in concept to the privilege separation logic
>in sshd these days.
>If we use a global atom that isn't truely global, this will break.

Robert, please give me a little credit.  I know what ftok does.  I don't
know why you have to study ftok to see if GlobalAtom is per-user or not.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]