Problem with spawning an external process
Daniel Nogradi
nogradi at gmail.com
Wed Apr 12 06:00:36 EDT 2006
> > > I want to execute a command (in this case, and it seems to be
> > > significant, a Java program) in a thread in Python. When I execute the
> > > java binary in the main python thread, everything runs correctly. But
> > > when I try and execute java in a thread, java segfaults. I am using
> > > Python 2.3.3 and trying to run the java binary from the 1.4.2 SDK from
> > > Sun.
> > > Here is the output that I get on my machine:
> > > [nico@ script]$ python testcrash2.py
> > > In main thread
> > > <JAVA USAGE INFO STRIPPED>
> > > PID: 32107 signal: 0 return code: 1
> > > In Thread
> > > PID: 32116 signal: 11 return code: 0
>
>
> Your code works fine here both in the main and the new thread. Here is
> the output:
>
> In main thread
> <java complaining about no arguments>
> PID: 5990 signal: 0 return code: 1
> In Thread
> <java complaining about no arguments>
> Waiting...PID: 5999 signal: 0 return code: 1
> ...Finished
>
> So I guess the problem is somewhere else.
And I should have also added that this is with python 2.4, java 1.4.2, suse 9.3.
More information about the Python-list
mailing list