Chris Uppal wrote:
> santiago538@[EMAIL PROTECTED]
wrote:
>
> > I have written an application in Java and C on the Solaris 10 (x86)
> > platform using the JDK 1.5.0_09. The Java code calls a native method
> > "startButtonWatcher," which then forks, the parent process returning,
> > and the child process initiating an event loop that calls a static
> > method, "sendButtonEvent," on a Java class "ButtonWatcher."
>
> You mean you actually call fork() to create a new Unix process ??
>
> If so then I'm extremely surprised that it works at all, let alone 64
times
> before failing.
>
> If not then I presume you mean that you start a new OS thread from your
C code
> (within the same Unix process). In that case I'd suspect that you are
doing
> something "wrong" with your threads (or, also a plausible hypothesis
> unfortunately, that Sun are doing something wrong with /their/ threads),
and
> that the difference in behaviour has little to do with the way the JVM
is
> launched. Check that you are being completely clean about how you
access
> AWT/Swing objects, and that you don't do /anything/ to them except from
code
> runnng on the EDT. Of course, that's only a guess; another possibility
is
> that you have a good old-fa****oned deadlock which is not related to AWT
at
> all...
>
> -- chris
Hi Chris,
I'm new to Unix programming, and I did use a fork(). I changed my code
to use pthreads instead and it works fine now. Thanks


|