public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* rwho in cygwin?
@ 2003-10-14  8:49 Christian Joensson
  2003-10-14  9:11 ` Corinna Vinschen
  2003-10-14  9:25 ` Carlo Florendo
  0 siblings, 2 replies; 18+ messages in thread
From: Christian Joensson @ 2003-10-14  8:49 UTC (permalink / raw)
  To: cygwin

Would it be possible/desirable to have the rwho package under cygwin?

Cheers,

/ChJ


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: rwho in cygwin?
  2003-10-14  8:49 rwho in cygwin? Christian Joensson
@ 2003-10-14  9:11 ` Corinna Vinschen
  2003-10-14 11:42   ` Christian Joensson
  2003-10-14  9:25 ` Carlo Florendo
  1 sibling, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2003-10-14  9:11 UTC (permalink / raw)
  To: cygwin

On Tue, Oct 14, 2003 at 10:02:30AM +0200, Christian Joensson wrote:
> Would it be possible/desirable to have the rwho package under cygwin?

Did you try to build it?  Does it work?  Are you volunteering as a
package maintainer?  If so, then the answer is "yes".

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: rwho in cygwin?
  2003-10-14  8:49 rwho in cygwin? Christian Joensson
  2003-10-14  9:11 ` Corinna Vinschen
@ 2003-10-14  9:25 ` Carlo Florendo
  2003-10-14 12:36   ` cygpath hangings chris
  1 sibling, 1 reply; 18+ messages in thread
From: Carlo Florendo @ 2003-10-14  9:25 UTC (permalink / raw)
  To: cygwin

From: "Christian Joensson" 
> Would it be possible/desirable to have the rwho package under cygwin?

Yes. If someone would volunteer to contribute and maintain it.  

Thanks!

Best Regards,

Carlo
------
Carlo Florendo
Astra Philippines Inc.
http://www.hq.astra.ph
 



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: rwho in cygwin?
  2003-10-14  9:11 ` Corinna Vinschen
@ 2003-10-14 11:42   ` Christian Joensson
  0 siblings, 0 replies; 18+ messages in thread
From: Christian Joensson @ 2003-10-14 11:42 UTC (permalink / raw)
  To: cygwin

On Tue, Oct 14, 2003 at 10:51:38AM +0200, Corinna Vinschen wrote:
> On Tue, Oct 14, 2003 at 10:02:30AM +0200, Christian Joensson wrote:
> > Would it be possible/desirable to have the rwho package under cygwin?
> 
> Did you try to build it?  Does it work?  Are you volunteering as a
> package maintainer?  If so, then the answer is "yes".

yes, no, not really... so as you put it, then "no".

Cheers,

/ChJ


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* cygpath hangings
  2003-10-14  9:25 ` Carlo Florendo
@ 2003-10-14 12:36   ` chris
  2003-10-14 12:54     ` Corinna Vinschen
                       ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: chris @ 2003-10-14 12:36 UTC (permalink / raw)
  To: cygwin

I decided to try to put some investigation into the cygpath crashings 
that have been reported so much. Here are my findings.. I hope this 
helps! I'd be happy to try further debuggings, except I couldn't figure 
out how to attach a debugger to the program (because as previously noted 
the hang only occurs when running from setup.exe)

I used the basic setup contained in 
http://www.cygwin.com/ml/cygwin-apps/2003-10/msg00049.html , but made a 
new program I call cygcrash.cc, which I include the source code to at 
the end of this message. If I comment out the call to 
SHGetPathFromIDList in this program, the program returns, else it hangs.

Also, This program seems to be both valid c++ and c code. If it is 
compiled in gcc, all is fine. In g++, it hangs.

If there is anything else anyone would like me to try (like taking a -E 
and picking out all the useless bits of shlobj.h), I'd be happy to do 
so, but won't unless it will be useful to someone :)

-- Code begins --

#include <shlobj.h>

void fee (void) {
  char *buf;
  LPITEMIDLIST id;
  SHGetPathFromIDList (id, buf);
}


int main (int argc, char **argv)
{
    return 0;
}



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 12:36   ` cygpath hangings chris
@ 2003-10-14 12:54     ` Corinna Vinschen
  2003-10-14 13:08       ` chris
  2003-10-14 13:38     ` Igor Pechtchanski
  2003-10-14 22:23     ` Brian Ford
  2 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2003-10-14 12:54 UTC (permalink / raw)
  To: cygwin

On Tue, Oct 14, 2003 at 12:44:57PM +0100, chris wrote:
> Also, This program seems to be both valid c++ and c code. If it is 
> compiled in gcc, all is fine. In g++, it hangs.
> [...]
> If there is anything else anyone would like me to try (like taking a -E 
> and picking out all the useless bits of shlobj.h), I'd be happy to do 
> so, but won't unless it will be useful to someone :)
> 
> -- Code begins --
> 
> #include <shlobj.h>
> 
> void fee (void) {
>  char *buf;
>  LPITEMIDLIST id;
>  SHGetPathFromIDList (id, buf);
> }
> 
> 
> int main (int argc, char **argv)
> {
>    return 0;
> }

Nope, not for me.  Are you, by any chance, still using gcc2?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 12:54     ` Corinna Vinschen
@ 2003-10-14 13:08       ` chris
  2003-10-14 13:15         ` Corinna Vinschen
  0 siblings, 1 reply; 18+ messages in thread
From: chris @ 2003-10-14 13:08 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen wrote:

>On Tue, Oct 14, 2003 at 12:44:57PM +0100, chris wrote:
>  
>
>>Also, This program seems to be both valid c++ and c code. If it is 
>>compiled in gcc, all is fine. In g++, it hangs.
>>[...]
>>If there is anything else anyone would like me to try (like taking a -E 
>>and picking out all the useless bits of shlobj.h), I'd be happy to do 
>>so, but won't unless it will be useful to someone :)
>>
>>-- Code begins --
>>
>>#include <shlobj.h>
>>
>>void fee (void) {
>> char *buf;
>> LPITEMIDLIST id;
>> SHGetPathFromIDList (id, buf);
>>}
>>
>>
>>int main (int argc, char **argv)
>>{
>>   return 0;
>>}
>>    
>>
>
>Nope, not for me.  Are you, by any chance, still using gcc2?
>  
>
Nope, using gcc 3.3.1 (cygming special)

Just checking... have you been suffering from the "cygpath" crashing 
during setup? If not I imagine that you wouldn't have any problems with 
this, as it is just a (very!) cutdown cygpath.

Just checking (although sorry if I'm being stupid). Can someone else who 
is having the cygpath crash check they get a crash from this too?

Chris



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 13:08       ` chris
@ 2003-10-14 13:15         ` Corinna Vinschen
  0 siblings, 0 replies; 18+ messages in thread
From: Corinna Vinschen @ 2003-10-14 13:15 UTC (permalink / raw)
  To: cygwin

On Tue, Oct 14, 2003 at 01:33:03PM +0100, chris wrote:
> Corinna Vinschen wrote:
> >Nope, not for me.  Are you, by any chance, still using gcc2?
> >
> Nope, using gcc 3.3.1 (cygming special)
> 
> Just checking... have you been suffering from the "cygpath" crashing 
> during setup? If not I imagine that you wouldn't have any problems with 
> this, as it is just a (very!) cutdown cygpath.

No, I haven't.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 12:36   ` cygpath hangings chris
  2003-10-14 12:54     ` Corinna Vinschen
@ 2003-10-14 13:38     ` Igor Pechtchanski
  2003-10-14 14:40       ` chris
  2003-10-14 21:14       ` Brian Ford
  2003-10-14 22:23     ` Brian Ford
  2 siblings, 2 replies; 18+ messages in thread
From: Igor Pechtchanski @ 2003-10-14 13:38 UTC (permalink / raw)
  To: chris; +Cc: cygwin

On Tue, 14 Oct 2003, chris wrote:

> I decided to try to put some investigation into the cygpath crashings
> that have been reported so much. Here are my findings.. I hope this
> helps! I'd be happy to try further debuggings, except I couldn't figure
> out how to attach a debugger to the program (because as previously noted
> the hang only occurs when running from setup.exe)
>
> I used the basic setup contained in
> http://www.cygwin.com/ml/cygwin-apps/2003-10/msg00049.html , but made a
> new program I call cygcrash.cc, which I include the source code to at
> the end of this message. If I comment out the call to
> SHGetPathFromIDList in this program, the program returns, else it hangs.
>
> Also, This program seems to be both valid c++ and c code. If it is
> compiled in gcc, all is fine. In g++, it hangs.
>
> If there is anything else anyone would like me to try (like taking a -E
> and picking out all the useless bits of shlobj.h), I'd be happy to do
> so, but won't unless it will be useful to someone :)
>
> -- Code begins --
>
> #include <shlobj.h>
>
> void fee (void) {
>   char *buf;
>   LPITEMIDLIST id;
>   SHGetPathFromIDList (id, buf);
> }
>
>
> int main (int argc, char **argv)
> {
>     return 0;
> }

Chris,

I suspect that this hang might be happening while loading the DLL.  Could
you try to link your program with something like below and see if it still
hangs, and what it outputs?  If it doesn't hang, try renaming
SHGetPathFromIDList below to something else (e.g., foo) that calls the
real SHGetPathFromIDList, call foo() from your fee() above, and link your
program against both test_dll.dll and SHLWAPI.DLL.
	Igor
P.S. Please don't start new threads as replies to unrelated messages -- it
confuses threaded readers.

-------------------------- BEGIN test_dll.c --------------------------
#include <windows.h>
#include <stdio.h>
#include <shlobj.h>

static FILE *output = NULL;

void SHGetPathFromIDList(LPITEMIDLIST id, char *buf) {
  return;
}

BOOL WINAPI DllMain(HINSTANCE h, DWORD f, LPVOID r) {
  if (!output) output = stderr;
  fprintf (output, "DLL loaded: ");
  switch (f) {
    case DLL_PROCESS_ATTACH: fprintf (output, "process attach");
                             break;
    case DLL_THREAD_ATTACH:  fprintf (output, "thread attach");
                             break;
    case DLL_THREAD_DETACH:  fprintf (output, "thread detach");
                             break;
    case DLL_PROCESS_DETACH: fprintf (output, "process detach");
                             break;
    default:                 fprintf (output, "WTF?!");
  }
  fprintf (output, "\n");
  fflush (output);
  return TRUE;
}
---------- Note: cutting here may damage your screen surface ---------

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 13:38     ` Igor Pechtchanski
@ 2003-10-14 14:40       ` chris
  2003-10-14 14:52         ` Igor Pechtchanski
  2003-10-14 21:14       ` Brian Ford
  1 sibling, 1 reply; 18+ messages in thread
From: chris @ 2003-10-14 14:40 UTC (permalink / raw)
  To: cygwin

Chris,

>I suspect that this hang might be happening while loading the DLL.  Could
>you try to link your program with something like below and see if it still
>hangs, and what it outputs?  If it doesn't hang, try renaming
>SHGetPathFromIDList below to something else (e.g., foo) that calls the
>real SHGetPathFromIDList, call foo() from your fee() above, and link your
>program against both test_dll.dll and SHLWAPI.DLL.
>	Igor
>P.S. Please don't start new threads as replies to unrelated messages -- it
>confuses threaded readers.
>  
>
Can I just ask (and I could be about to deeply embarass myself I think). 
How do I link against particular .dlls? up until now I've just been 
writing " gcc file.c -o file"



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 14:40       ` chris
@ 2003-10-14 14:52         ` Igor Pechtchanski
  0 siblings, 0 replies; 18+ messages in thread
From: Igor Pechtchanski @ 2003-10-14 14:52 UTC (permalink / raw)
  To: chris; +Cc: cygwin

On Tue, 14 Oct 2003, chris wrote:

> Chris,
>
> >I suspect that this hang might be happening while loading the DLL.  Could
> >you try to link your program with something like below and see if it still
> >hangs, and what it outputs?  If it doesn't hang, try renaming
> >SHGetPathFromIDList below to something else (e.g., foo) that calls the
> >real SHGetPathFromIDList, call foo() from your fee() above, and link your
> >program against both test_dll.dll and SHLWAPI.DLL.
> >       Igor
> >P.S. Please don't start new threads as replies to unrelated messages -- it
> >confuses threaded readers.
>
> Can I just ask (and I could be about to deeply embarass myself I think).
> How do I link against particular .dlls? up until now I've just been
> writing "gcc file.c -o file"

"gcc file.c -o file -L. -ltest_dll"
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 13:38     ` Igor Pechtchanski
  2003-10-14 14:40       ` chris
@ 2003-10-14 21:14       ` Brian Ford
  2003-10-14 21:24         ` Igor Pechtchanski
  1 sibling, 1 reply; 18+ messages in thread
From: Brian Ford @ 2003-10-14 21:14 UTC (permalink / raw)
  To: cygwin

Igor,

On Tue, 14 Oct 2003, Igor Pechtchanski wrote:

> On Tue, 14 Oct 2003, chris wrote:
>
> > -- Code begins --
> >
> > #include <shlobj.h>
> >
> > void fee (void) {
> >   char *buf;
> >   LPITEMIDLIST id;
> >   SHGetPathFromIDList (id, buf);
> > }
> >
> > int main (int argc, char **argv)
> > {
> >     return 0;
> > }
>
> Chris,
>
> I suspect that this hang might be happening while loading the DLL.  Could
> you try to link your program with something like below and see if it still
> hangs, and what it outputs?
>
Yes, it still hangs when run under setup from explorer.  No output from
the hung one, or when run stand alone in bash.

> If it doesn't hang, try renaming
> SHGetPathFromIDList below to something else (e.g., foo) that calls the
> real SHGetPathFromIDList, call foo() from your fee() above, and link your
> program against both test_dll.dll and SHLWAPI.DLL.
>
Well, I didn't link explicitly with SHLWAPI.DLL, but same here.

There will be no ouput unless main calls foo, right?  Then, I still get a
hang under setup from explorer; no output.  Stand alone in a shell, output
is:

DLL loaded: process attach
DLL loaded: thread attach
Segmentation fault (core dumped)

The SEGV is expected given the code is invalid anyway.

Nothing to see here... move along...

>
> -------------------------- BEGIN test_dll.c --------------------------
> #include <windows.h>
> #include <stdio.h>
> #include <shlobj.h>
>
> static FILE *output = NULL;
>
> void SHGetPathFromIDList(LPITEMIDLIST id, char *buf) {
>   return;
> }
>
> BOOL WINAPI DllMain(HINSTANCE h, DWORD f, LPVOID r) {
>   if (!output) output = stderr;
>   fprintf (output, "DLL loaded: ");
>   switch (f) {
>     case DLL_PROCESS_ATTACH: fprintf (output, "process attach");
>                              break;
>     case DLL_THREAD_ATTACH:  fprintf (output, "thread attach");
>                              break;
>     case DLL_THREAD_DETACH:  fprintf (output, "thread detach");
>                              break;
>     case DLL_PROCESS_DETACH: fprintf (output, "process detach");
>                              break;
>     default:                 fprintf (output, "WTF?!");
>   }
>   fprintf (output, "\n");
>   fflush (output);
>   return TRUE;
> }
> ---------- Note: cutting here may damage your screen surface ---------

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 21:14       ` Brian Ford
@ 2003-10-14 21:24         ` Igor Pechtchanski
  2003-10-14 21:39           ` Brian Ford
  0 siblings, 1 reply; 18+ messages in thread
From: Igor Pechtchanski @ 2003-10-14 21:24 UTC (permalink / raw)
  To: Brian Ford; +Cc: cygwin

On Tue, 14 Oct 2003, Brian Ford wrote:

> Igor,
>
> On Tue, 14 Oct 2003, Igor Pechtchanski wrote:
>
> > On Tue, 14 Oct 2003, chris wrote:
> >
> > > -- Code begins --
> > >
> > > #include <shlobj.h>
> > >
> > > void fee (void) {
> > >   char *buf;
> > >   LPITEMIDLIST id;
> > >   SHGetPathFromIDList (id, buf);
> > > }
> > >
> > > int main (int argc, char **argv)
> > > {
> > >     return 0;
> > > }
> >
> > Chris,
> >
> > I suspect that this hang might be happening while loading the DLL.  Could
> > you try to link your program with something like below and see if it still
> > hangs, and what it outputs?
> >
> Yes, it still hangs when run under setup from explorer.  No output from
> the hung one, or when run stand alone in bash.
>
> > If it doesn't hang, try renaming
> > SHGetPathFromIDList below to something else (e.g., foo) that calls the
> > real SHGetPathFromIDList, call foo() from your fee() above, and link your
> > program against both test_dll.dll and SHLWAPI.DLL.
> >
> Well, I didn't link explicitly with SHLWAPI.DLL, but same here.

Does "cygcheck yourprog.exe" show both test_dll.dll and SHLWAPI.DLL?

> There will be no ouput unless main calls foo, right?

Actually, if the DLL was loaded, there should be output even if foo isn't
called...

> Then, I still get a hang under setup from explorer; no output.

This could be because the DLL was not loaded, or because of the two stdio
conflicts...  Did you compile the DLL with -mno-cygwin?

> Stand alone in a shell, output is:
>
> DLL loaded: process attach
> DLL loaded: thread attach
> Segmentation fault (core dumped)
>
> The SEGV is expected given the code is invalid anyway.
>
> Nothing to see here... move along...
> [snip test_dll.c]

Hmm.  Maybe if the DLL has exported global variables, not just functions?
I'll see if I can come up with the appropriate code and will then post it
to the list.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 21:24         ` Igor Pechtchanski
@ 2003-10-14 21:39           ` Brian Ford
  2003-10-15 17:12             ` Igor Pechtchanski
  0 siblings, 1 reply; 18+ messages in thread
From: Brian Ford @ 2003-10-14 21:39 UTC (permalink / raw)
  To: cygwin

On Tue, 14 Oct 2003, Igor Pechtchanski wrote:
> Does "cygcheck yourprog.exe" show both test_dll.dll and SHLWAPI.DLL?
>
ford@fordpc ~
$ cygcheck cyghan.exe
Found: .\cyghan.exe
cyghan.exe
  G:\cygwin\bin\cygwin1.dll
    D:\WINNT\System32\KERNEL32.dll
      D:\WINNT\System32\ntdll.dll
  .\cygl.dll
    D:\WINNT\System32\SHELL32.DLL
      D:\WINNT\System32\GDI32.dll
        D:\WINNT\System32\USER32.dll
          D:\WINNT\System32\ADVAPI32.dll
            D:\WINNT\System32\RPCRT4.dll
      D:\WINNT\System32\SHLWAPI.dll
        D:\WINNT\System32\msvcrt.dll
      D:\WINNT\System32\COMCTL32.dll

test_dll.dll is actually .\cygl.dll

>Brian Ford wrote:
> > There will be no ouput unless main calls foo, right?
>
> Actually, if the DLL was loaded, there should be output even if foo isn't
> called...
>
Just linking to it causes a load, or is it the first referance?  I'm a DLL
dunce.

> > Then, I still get a hang under setup from explorer; no output.
>
> This could be because the DLL was not loaded, or because of the two stdio
> conflicts...  Did you compile the DLL with -mno-cygwin?
>
No.  I guess you wanted me too? :)

> > Stand alone in a shell, output is:
> >
> > DLL loaded: process attach
> > DLL loaded: thread attach
> > Segmentation fault (core dumped)
> >
> > The SEGV is expected given the code is invalid anyway.
> >
> > Nothing to see here... move along...
> > [snip test_dll.c]
>
> Hmm.  Maybe if the DLL has exported global variables, not just functions?
> I'll see if I can come up with the appropriate code and will then post it
> to the list.
>
Not following, but ok.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 12:36   ` cygpath hangings chris
  2003-10-14 12:54     ` Corinna Vinschen
  2003-10-14 13:38     ` Igor Pechtchanski
@ 2003-10-14 22:23     ` Brian Ford
  2003-10-14 22:58       ` Brian Ford
  2 siblings, 1 reply; 18+ messages in thread
From: Brian Ford @ 2003-10-14 22:23 UTC (permalink / raw)
  To: cygwin

Chris,

On Tue, 14 Oct 2003, chris wrote:

> If I comment out the call to SHGetPathFromIDList in this program, the
> program returns, else it hangs.
>
Confirmed.

> Also, This program seems to be both valid c++ and c code. If it is
> compiled in gcc, all is fine. In g++, it hangs.
>
Really?  I see the hang regardless.

> -- Code begins --
>
> #include <shlobj.h>
>
> void fee (void) {
>   char *buf;
>
I changed this to char buf[255] just to be safer.

>   LPITEMIDLIST id;
>   SHGetPathFromIDList (id, buf);
> }
>
> int main (int argc, char **argv)
> {
>     return 0;
> }
>

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 22:23     ` Brian Ford
@ 2003-10-14 22:58       ` Brian Ford
  0 siblings, 0 replies; 18+ messages in thread
From: Brian Ford @ 2003-10-14 22:58 UTC (permalink / raw)
  To: cygwin

On Tue, 14 Oct 2003, Brian Ford wrote:

> On Tue, 14 Oct 2003, chris wrote:
>
> > If I comment out the call to SHGetPathFromIDList in this program, the
> > program returns, else it hangs.
> >
> Confirmed.
>
> > Also, This program seems to be both valid c++ and c code. If it is
> > compiled in gcc, all is fine. In g++, it hangs.
> >
> Really?  I see the hang regardless.
>
It is also valid -mno-cygwin code, and when compiled this way, it still
hangs.  Doesn't this eliminate a good portion of the Cygwin startup code
since this is a MINGW executable?

It must be something the exec stub did?  I do see a few cases of suspended
starting in spawn_guts.  Might it have forgotten to resume?  Is there an
easy way to tell if it is suspended?

I'm still puzzled about why the input redirect helps.  Recap:

/etc/postinstall/hang.sh:

#!/bin/bash

FOO=`hangprog.exe < /dev/null`
BAR=`hangprog.exe` # hangs here!

where hangprog.exe is:

> > -- Code begins --
> >
> > #include <shlobj.h>
> >
> > void fee (void) {
> >   char *buf;
> >
> I changed this to char buf[255] just to be safer.
>
> >   LPITEMIDLIST id;
> >   SHGetPathFromIDList (id, buf); // Comment this out and no hang.
> > }
> >
> > int main (int argc, char **argv)
> > {
> >     return 0;
> > }
> >

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-14 21:39           ` Brian Ford
@ 2003-10-15 17:12             ` Igor Pechtchanski
  2003-10-15 17:47               ` Brian Ford
  0 siblings, 1 reply; 18+ messages in thread
From: Igor Pechtchanski @ 2003-10-15 17:12 UTC (permalink / raw)
  To: Brian Ford; +Cc: cygwin

On Tue, 14 Oct 2003, Brian Ford wrote:

> On Tue, 14 Oct 2003, Igor Pechtchanski wrote:
> >Brian Ford wrote:
> > > There will be no ouput unless main calls foo, right?
> >
> > Actually, if the DLL was loaded, there should be output even if foo isn't
> > called...
> >
> Just linking to it causes a load, or is it the first referance?  I'm a DLL
> dunce.

I've just verified that the DLL is loaded even if no functions from it are
called (or variables referenced).  FWIW, here's the code I used:

$ cat > cpath.c
int hello();
void foo (void) { hello(); }
int main (int argc, char **argv) { return 0; }
$ cat > cygx.c
#include <windows.h>
#include <stdio.h>

static int counter = 0;
static FILE *output = NULL;

int hello() {
  fprintf (output, "Hello world for the %dth time!\n", counter);
  fflush (output);
  return counter++;
}

BOOL WINAPI DllMain(HINSTANCE h, DWORD f, LPVOID r) {
  if (!output) output = fopen("cygx.out", "wt");
  fprintf (output, "DLL loaded: ");
  switch (f) {
    case DLL_PROCESS_ATTACH: fprintf (output, "process attach");
                             break;
    case DLL_THREAD_ATTACH:  fprintf (output, "thread attach");
                             break;
    case DLL_THREAD_DETACH:  fprintf (output, "thread detach");
                             break;
    case DLL_PROCESS_DETACH: fprintf (output, "process detach");
                             break;
    default:                 fprintf (output, "WTF?!");
  }
  fprintf (output, "\n");
  fflush (output);
  return TRUE;
}
$ gcc -mno-cygwin -shared -o cygx.dll cygx.c
$ gcc -o cpath.exe cpath.c -L. -lcygx
$ ./cpath.exe; cat cygx.out
DLL loaded: process attach
DLL loaded: thread attach
DLL loaded: process detach
$

> > > Then, I still get a hang under setup from explorer; no output.
> >
> > This could be because the DLL was not loaded, or because of the two stdio
> > conflicts...  Did you compile the DLL with -mno-cygwin?
>
> No.  I guess you wanted me too? :)

I don't know if it matters, frankly.  It looks like the DLL is loaded, but
it doesn't load completely.  Maybe something that SHLWAPI.DLL is doing on
initialization?

> > > Stand alone in a shell, output is:
> > >
> > > DLL loaded: process attach
> > > DLL loaded: thread attach
> > > Segmentation fault (core dumped)
> > >
> > > The SEGV is expected given the code is invalid anyway.
> > >
> > > Nothing to see here... move along...
> > > [snip test_dll.c]
> >
> > Hmm.  Maybe if the DLL has exported global variables, not just functions?
> > I'll see if I can come up with the appropriate code and will then post it
> > to the list.
> >
> Not following, but ok.

I meant making "counter" in the above example global rather than static.
Turns out it doesn't make a difference -- the DLL is loaded anyway.  I
still suspect the initialization code in SHLWAPI.DLL is doing something
that Cygwin doesn't like.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: cygpath hangings
  2003-10-15 17:12             ` Igor Pechtchanski
@ 2003-10-15 17:47               ` Brian Ford
  0 siblings, 0 replies; 18+ messages in thread
From: Brian Ford @ 2003-10-15 17:47 UTC (permalink / raw)
  To: cygwin

On Wed, 15 Oct 2003, Igor Pechtchanski wrote:

> On Tue, 14 Oct 2003, Brian Ford wrote:
> > On Tue, 14 Oct 2003, Igor Pechtchanski wrote:
> > >Brian Ford wrote:
> > > > There will be no ouput unless main calls foo, right?
> > >
> > > Actually, if the DLL was loaded, there should be output even if foo isn't
> > > called...
> > >
> > Just linking to it causes a load, or is it the first referance?  I'm a DLL
> > dunce.
>
> I've just verified that the DLL is loaded even if no functions from it are
> called (or variables referenced).  FWIW, here's the code I used:
>
It has been a while since I ran through this stuff, but I did get that
output in a bash shell after compiling with -mno-cygwin (I think).

> > > > Then, I still get a hang under setup from explorer; no output.
> > >
> > > This could be because the DLL was not loaded, or because of the two stdio
> > > conflicts...  Did you compile the DLL with -mno-cygwin?
> >
> > No.  I guess you wanted me too? :)
>
> I don't know if it matters, frankly.  It looks like the DLL is loaded, but
> it doesn't load completely.  Maybe something that SHLWAPI.DLL is doing on
> initialization?
>
I think it might (again, going on my faulty memory).

Does that comment mean you can reproduce this now?  I guess you're just
talking about email observations, right.

> I still suspect the initialization code in SHLWAPI.DLL is doing
> something that Cygwin doesn't like.
>
Maybe, it is just *very* strange.

Only setup launched from explorer launched bash launched back tick SHLWAPI
base program without input redirection.  Ugh...!  Any change in the above
and the problem goes away. (ie. explorer->setup->bash`SHLWAPI exe #
without < /dev/null`).

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2003-10-15 17:37 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-14  8:49 rwho in cygwin? Christian Joensson
2003-10-14  9:11 ` Corinna Vinschen
2003-10-14 11:42   ` Christian Joensson
2003-10-14  9:25 ` Carlo Florendo
2003-10-14 12:36   ` cygpath hangings chris
2003-10-14 12:54     ` Corinna Vinschen
2003-10-14 13:08       ` chris
2003-10-14 13:15         ` Corinna Vinschen
2003-10-14 13:38     ` Igor Pechtchanski
2003-10-14 14:40       ` chris
2003-10-14 14:52         ` Igor Pechtchanski
2003-10-14 21:14       ` Brian Ford
2003-10-14 21:24         ` Igor Pechtchanski
2003-10-14 21:39           ` Brian Ford
2003-10-15 17:12             ` Igor Pechtchanski
2003-10-15 17:47               ` Brian Ford
2003-10-14 22:23     ` Brian Ford
2003-10-14 22:58       ` Brian Ford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).