This is the mail archive of the cygwin-patches 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: [PATCH] Possibly correct fix to strace phantom process entry


On Apr 24 19:00, Daniel Santos wrote:
> On 04/24/2017 10:38 AM, Corinna Vinschen wrote:
> 
> > I'm going with my patch for now.  Mainly because I added some debug
> > output to see if we need the Sleep loop at all.  Right now I don't see
> > any situation which would qualify for this.
> > 
> > 
> > Thanks,
> > Corinna
> 
> Thanks for your help on this Corinna!
> 
> I'm inclined to agree about the sleep loop.  I have concerns about leaving
> these odd "ghost" process entries in and I have concerns about whacking them
> for all dynamic loads of cygwin1.dll. :)  The only cleaner solution that I
> can think of us to set an environment variable (or value in CYGWIN) to tell
> cygwin1.dll not to call pinfo::thisproc() in
> child_info_spawn::handle_spawn() -- that still feels like a bandaid.  (I
> suppose there's also using LoadLibraryEx and if there's some parameter we
> can pass to the DLL from there.)
> 
> Incidentally, when I debug strace with gdb the problem does away. Thus, I've
> been debugging this by littering the code with OutputDebugStringA()s,
> sometimes adding some Sleep delays, recompiling, exiting, restarting sshd,
> etc.  Is there an easier way to debug stuff like this?
> 
> Either way, I want to better understand how all of the cases of how
> cygwin1.dll is loaded and processes are inited.  Searching the code, I see
> that cygcheck also uses LoadLibrary, as well as cygwin::connector::connector
> (const char *dll) (although I can't tell what that is for).
> 
> I have to run, so I'll get back to this later.

I'm looking forward to any improvement in this area.


Thanks,
Cornna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature


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