[PATCH] Possibly correct fix to strace phantom process entry
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Apr 25 12:28:00 GMT 2017
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20170425/1b95e4f3/attachment.sig>
More information about the Cygwin-patches
mailing list