public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: msvc based X dlls and fork
@ 2001-04-02  9:23 Victor Polsky
  0 siblings, 0 replies; 5+ messages in thread
From: Victor Polsky @ 2001-04-02  9:23 UTC (permalink / raw)
  To: Andrew Markebo; +Cc: cygwin

Yes, I have a cygwin-compiled application doing X-stuff through a
ms-compiled dll, to be exact
Exceed XDK dlls. xterm crashes during initialization when trying to create
child process by calling fork.
My question is: why fork does not copy data from parent to child process
properly?
I know that xterm developed with xfree86 works which means fork works fine,
but I'd prefer XDK.
How I see the problem: Xt is not a dll in xfree86 but static library, in XDK
it's a dll, and all widget stuff
is created there. So, it's well known problem of MS dlls with so-called
extra pointer to data.
MS __decspec(import) mechanism resolves it, but what about CYGWIN32?

Victor.


-----Original Message-----
From: Andrew Markebo <flognat@flognat.myip.org>
To: Victor Polsky <victor@hcl.com>
Cc: cygwin@cygwin.com <cygwin@cygwin.com>
Date: Monday, April 02, 2001 11:43 AM
Subject: Re: msvc based X dlls and fork


>I am having a small problem seeing the area around the problem. You
>have a cygwin-compiled application doing X-stuff through a ms-compiled
>dll, or??
>
>What is the xterm doing?
>
>You maybe should give the X-libraries compiled with cygwin a try?
>        http://xfree86.cygwin.com/
>
>        /Andy
>
>/ "Victor Polsky" <victor@hcl.com> wrote:
>| Hi,
>|
>| I have found that when I use X dlls built with msvc (not gcc) all
structures
>| created inside the dlls (Display for example) cannot be used in child
>| process created by fork. The app (xterm) will crash inside child process.
I
>| can see correct pointer to structure in the child but inside the
structure
>| some junk.
>| Could anybody tell me what's wrong or what I did wrong to have it?
>| Maybe it's some compiler or linker flag I missed?
>|
>| Thanks, Victor.
>|
>|
>|
>|
>|
>| --
>| Want to unsubscribe from this list?
>| Check out: http://cygwin.com/ml/#unsubscribe-simple
>


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

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

* Re: msvc based X dlls and fork
@ 2001-04-04 17:25 Suhaib Siddiqi
  0 siblings, 0 replies; 5+ messages in thread
From: Suhaib Siddiqi @ 2001-04-04 17:25 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

This actualy belong to Cygwin-xfree mailing list.  
Sure you can do Cygwin compiled stuff doing X with MSVC compiled dll.  
Assuming from your address you are from Hummingbirrd?
The Xt is is a DLL is your product because it is a total hack.  Your
HCLXt.dll uses multiple layers to communicate with M$ C runtime libraries.
Try to compile xt.dll with MSVC from X11R6.x without having it depend upon
your hclt and bunch of other hclxxx dlls, and tell let me know if it would
work.  Read FAQ at http://xfree86.cygwin.com why Xt, Xmu, and Xaw cannot be
compiled as DLLs Out-of-the-box.

BTW you can link MSVC compiled XDK dlls but I have a question, you are
linking against Cygwin1.dll your XDK dlls but all the applications I
compiled using XDk libraries for Cygwin were so crapy because of missing
fork I trashed them.

Suhaib

-----------------------
Yes, I have a cygwin-compiled application doing X-stuff through a
ms-compiled dll, to be exact
Exceed XDK dlls. xterm crashes during initialization when trying to create
child process by calling fork.
My question is: why fork does not copy data from parent to child process
properly?
I know that xterm developed with xfree86 works which means fork works fine,
but I'd prefer XDK.
How I see the problem: Xt is not a dll in xfree86 but static library, in XDK
it's a dll, and all widget stuff
is created there. So, it's well known problem of MS dlls with so-called
extra pointer to data.
MS __decspec(import) mechanism resolves it, but what about CYGWIN32?

Victor.


-----Original Message-----
From: Andrew Markebo <flognat@flognat.myip.org>
To: Victor Polsky <victor@hcl.com>
Cc: cygwin@cygwin.com <cygwin@cygwin.com>
Date: Monday, April 02, 2001 11:43 AM
Subject: Re: msvc based X dlls and fork


>I am having a small problem seeing the area around the problem. You
>have a cygwin-compiled application doing X-stuff through a ms-compiled
>dll, or??
>
>What is the xterm doing?
>
>You maybe should give the X-libraries compiled with cygwin a try?
>        http://xfree86.cygwin.com/
>
>        /Andy
>
>/ "Victor Polsky" <victor@hcl.com> wrote:
>| Hi,
>|
>| I have found that when I use X dlls built with msvc (not gcc) all
structures
>| created inside the dlls (Display for example) cannot be used in child
>| process created by fork. The app (xterm) will crash inside child process.
I
>| can see correct pointer to structure in the child but inside the
structure
>| some junk.
>| Could anybody tell me what's wrong or what I did wrong to have it?
>| Maybe it's some compiler or linker flag I missed?
>|
>| Thanks, Victor.
>|
>|
>|
>|
>|
>| --
>| Want to unsubscribe from this list?
>| Check out: http://cygwin.com/ml/#unsubscribe-simple

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

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

* Re: msvc based X dlls and fork
  2001-04-02  8:43 ` Andrew Markebo
@ 2001-04-02  9:33   ` Christopher Faylor
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Faylor @ 2001-04-02  9:33 UTC (permalink / raw)
  To: cygwin

fork knows nothing about non-cygwin DLLs.  You can't use msvc created
objects if you want to use fork. Sorry.

cgf

On Mon, Apr 02, 2001 at 05:43:25PM +0200, Andrew Markebo wrote:
>I am having a small problem seeing the area around the problem. You
>have a cygwin-compiled application doing X-stuff through a ms-compiled
>dll, or??
>
>What is the xterm doing?
>
>You maybe should give the X-libraries compiled with cygwin a try?
>        http://xfree86.cygwin.com/
>        
>        /Andy
>
>/ "Victor Polsky" <victor@hcl.com> wrote:
>| Hi,
>| 
>| I have found that when I use X dlls built with msvc (not gcc) all structures
>| created inside the dlls (Display for example) cannot be used in child
>| process created by fork. The app (xterm) will crash inside child process. I
>| can see correct pointer to structure in the child but inside the structure
>| some junk.
>| Could anybody tell me what's wrong or what I did wrong to have it?
>| Maybe it's some compiler or linker flag I missed?
>| 
>| Thanks, Victor.
>| 
>| 
>| 
>| 
>| 
>| --
>| Want to unsubscribe from this list?
>| Check out: http://cygwin.com/ml/#unsubscribe-simple
>
>--
>Want to unsubscribe from this list?
>Check out: http://cygwin.com/ml/#unsubscribe-simple

-- 
cgf@cygnus.com                        Red Hat, Inc.
http://sources.redhat.com/            http://www.redhat.com/

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

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

* Re: msvc based X dlls and fork
  2001-04-02  7:45 Victor Polsky
@ 2001-04-02  8:43 ` Andrew Markebo
  2001-04-02  9:33   ` Christopher Faylor
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Markebo @ 2001-04-02  8:43 UTC (permalink / raw)
  To: Victor Polsky; +Cc: cygwin

I am having a small problem seeing the area around the problem. You
have a cygwin-compiled application doing X-stuff through a ms-compiled
dll, or??

What is the xterm doing?

You maybe should give the X-libraries compiled with cygwin a try?
        http://xfree86.cygwin.com/
        
        /Andy

/ "Victor Polsky" <victor@hcl.com> wrote:
| Hi,
| 
| I have found that when I use X dlls built with msvc (not gcc) all structures
| created inside the dlls (Display for example) cannot be used in child
| process created by fork. The app (xterm) will crash inside child process. I
| can see correct pointer to structure in the child but inside the structure
| some junk.
| Could anybody tell me what's wrong or what I did wrong to have it?
| Maybe it's some compiler or linker flag I missed?
| 
| Thanks, Victor.
| 
| 
| 
| 
| 
| --
| Want to unsubscribe from this list?
| Check out: http://cygwin.com/ml/#unsubscribe-simple

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

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

* msvc based X dlls and fork
@ 2001-04-02  7:45 Victor Polsky
  2001-04-02  8:43 ` Andrew Markebo
  0 siblings, 1 reply; 5+ messages in thread
From: Victor Polsky @ 2001-04-02  7:45 UTC (permalink / raw)
  To: cygwin

Hi,

I have found that when I use X dlls built with msvc (not gcc) all structures
created inside the dlls (Display for example) cannot be used in child
process created by fork. The app (xterm) will crash inside child process. I
can see correct pointer to structure in the child but inside the structure
some junk.
Could anybody tell me what's wrong or what I did wrong to have it?
Maybe it's some compiler or linker flag I missed?

Thanks, Victor.





--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2001-04-04 17:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-02  9:23 msvc based X dlls and fork Victor Polsky
  -- strict thread matches above, loose matches on Subject: below --
2001-04-04 17:25 Suhaib Siddiqi
2001-04-02  7:45 Victor Polsky
2001-04-02  8:43 ` Andrew Markebo
2001-04-02  9:33   ` Christopher Faylor

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).