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]

Re: signal semaphores inheritance

On Wed, Feb 21, 2001 at 10:47:33AM +0300, Egor Duda wrote:
> Hi!
> Tuesday, 20 February, 2001 Corinna Vinschen wrote:
> CV> On Tue, Feb 20, 2001 at 07:24:09PM +0300, Egor Duda wrote:
> >> Hi!
> >> 
> >>   if  ntsec is on and cygwin app a.exe  (with pid x) starts non-cygwin
> >> app  b.exe,  b.exe  inherits  cygwin1S3.sigcatch.x semaphore. if a.exe
> >> dies  and  b.exe continue  execution,  and  if  new  cygwin  app c.exe
> >> got  pid  x it, fails to create sigcatch semaphore. looks like typo in
> >> getsem() to me. is this patch ok?
> CV> Did you check it with apps chenging the user context? AFAIR I had
> CV> a reason using an inheritable SD...
> hmm.  i  haven't noticed any differences. i may have missed something,
> though.  but,  if this handle is supposed to be inheritable, shouldn't
> it  be  DuplicateHandle()'d  in  child  process?  I've grepped through
> sources  and haven't find any DuplicateHandle() used on semaphores. so
> even   if   this   handle  is  made inheritable, i don't see the place
> where child is using it.

Please don't misunderstand me. I'm asking that question because I'm
really unsure why this is an inheritable SD and I only remember (in
the deepest corner of my brain) that there might have been _some_ issue
to do it that way but my alzheimer disease is getting worse...

If you have tested the patch with using telnet or ssh to actually
change the user context and an `id' results in the correct identity
and the permissions seem to be ok then I have no problem with your patch.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                      
Red Hat, Inc.

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