Re: java crashes in python thread
Easeway wrote: > I use os.system invoking java VM, when running in python thread, the > java application crashes. Andreas Jung has reported similar behaviour. He suggested that Java 1.4 and the threads of Linux 2.6 do not work reliably together. He tried Java 1.5 and this combination crashes only occationally. But this, it is not yet reliable... Dieter -- http://mail.python.org/mailman/listinfo/python-list
Re: java crashes in python thread
Easeway wrote: I use os.system invoking java VM, when running in python thread, the java application crashes. Can you define "crash" more precisely? Isn't there any kind of error message/traceback that would reveal more information about the problem? Also, how quickly do you get this crash? Instantly, shortly after starting, a long time after starting, at completion of the Java processes (maybe check to see whether the entire javac has executed, or some other sign of completion), or ? -Peter -- http://mail.python.org/mailman/listinfo/python-list
java crashes in python thread
I use os.system invoking java VM, when running in python thread, the java application crashes. But it works properly when thread is not used. Has any body come across with this problem? Python 2.3.3 J2SDK 1.4.2_05 SuSE Linux Enterprise Server 9 The following is source file: #!/usr/bin/env python import os, sys, threading class ThreadTask(threading.Thread) : def __init__(self, shellcmd) : threading.Thread.__init__(self) self.command = shellcmd def isStopped(self) : self.join(0.01) return not self.isAlive() def run(self) : os.system(self.command) def test() : commands = [ "/usr/lib/java/bin/javac", "/usr/lib/java/bin/java", ] tasks = [] for a in commands : tasks.append(ThreadTask(a)) for a in tasks : a.start() endcnt = 0 while endcnt < len(tasks) : endcnt = 0 for a in tasks : if a.isStopped() : endcnt += 1 print("DONE") test() -- http://mail.python.org/mailman/listinfo/python-list