Question.

Ruslan Shevchenko Ruslan at Shevchenko.kiev.ua
Sat Nov 8 16:39:55 PST 1997


aposiopesis man wrote:

> Quoting Ruslan Shevchenko (Ruslan at Shevchenko.kiev.ua):
> ?   jdb requiare  java.lang.UNIXProcess.run, to start.
> ?
> ?      Looking in sources, I can't understood --- what  this method must
> ? do.
> ?  (May be better --- set own pid, and nothing else ?)
> ?
> ?    Can anybode tell me about this ?
>
> It is an entry point, kind of like main, that is executed when you
> start a thread. If you have a class Foo that implements runnable, or
> is derived from thread, you can start a seperate thread running
> Foo.run by saying
>
> Foo foo = new Foo();
> foo.start();
> ... // do whatever you want the parent thread to do
>
> You now have two seperate threads running asynchronously. Foo.run
> needs to do whatever you want the foo thread to do, but there is no
> prescribed action that it must do. It could just count to 1000000 and
> return.
>

  No,  I mean  java.lang.UNIXProcess.run, not Runnable.run

  gdb calls
     java.lang.UNIXProcess.forkAndExec
       with pid = 0
    then
     java.lang.UNIXProcess.run
        with pid = 0

 (discovered by inserting "printf's in kaffe source code", not
    by looking in Sun sources).

  What must do java,lang.UNIXProcess.run, whan all, what we
    know about this process --- it's his pid, and standart input
   and output thread.

  In forkAndExec  child read a single byte from parent,
   (implementation of wait), than do execve.

  in principle, in run we must write this byte to child and set
   our pid.

  but 'naive' implementation is not work.

  (may be my test more complex, and I have error somewhere else ?)

 So:
    1, can anybody describe,  in general, what must do
        java.lang.UNIXProcess.run   and
        java.lang.UNIXProcess.notifyReaders.

   2, can anybody propose a good test for this methods in
        termins of published java API ?

Thanks.



> ?   If it is not development list, can anybody point me to one.
>
> I don't think it is. Here are some:
>
> comp.lang.java
> comp.lang.java.programmer
> comp.lang.java.security
> comp.lang.java.setup
> comp.lang.java.advocacy
> comp.lang.java.announce
> comp.lang.java.api
> comp.lang.java.misc
> comp.lang.java.tech
>
> -eric





More information about the kaffe mailing list