Santosh Dawara wrote:

> I say "# java HelloWorld as root I then run ps uax | grep javadir"
>
> root 25181 98.7  1.4 20840 3708 pts/0    R    13:33   1:02
> /javadir/sun/jd
> root 25205  0.0  1.4 20840 3708 pts/0    S    13:33   0:00
> /javadir/sun/jd
> root 25206  0.0  1.4 20840 3708 pts/0    S    13:33   0:00
> /javadir/sun/jd
> root 25207  0.0  1.4 20840 3708 pts/0    S    13:33   0:00
> /javadir/sun/jd
> root 25208  0.0  1.4 20840 3708 pts/0    S    13:33   0:00
> /javadir/sun/jd
>
> Don't pay attention to the number of processes they vary all the time.

If using green threads solves the problem, then you probably didn't really have
a problem. All those "processes" are really threads, and they should all share
the same privileges, despite what ps reported. If they do not (you might try a
test to see), then there is a bug in Linux threads.

Nathan


>
> I say "# java -green HelloWorld as root I then run ps uax | grep
> javadir"
>
> root 26281 98.7  1.4 20840 3708 pts/0    R    12:11   1:02
> /javadir/sun/jd
>
> Then If I Insert the Native code to su down to nobody
>
> I say "# java -green HelloWorld as root I then run ps uax | grep
> javadir"
>
> nobody 30052 98.7  1.4 20840 3708 pts/0    R    11:33   1:02
> /javadir/sun/jd
>
> Thank you, that solves the problem, I read up on 'green' after you
> posted
> to the list, I used it and viola ...
>
> Thanks everybody for the timely Feedback ...
>
> Regards,
> Santosh Dawara
>
> Joi Ellis wrote:
> >
> > On Thu, 14 Sep 2000, Santosh Dawara wrote:
> >
> > > Nathan Meyers wrote:
> > > >
> > > > You use 'forks' in quotes. Are they processes or threads? How were
> > > > they created?
> > >
> > > Proper Linux Processes, If you said "java Helloworld" for the simplest
> > > of
> > > code , 'ps uax ' will tell you 4 new Processes were Spawned , I am
> > > guessing they are for the JVMs Internal book keeping and for executing
> > > the code
> >
> > Keep in mind what flavor threads your JVM is using.  Green threads are
> > user threads and are invisible on a ps display.  Native threads are
> > tracked in ps as if they were separate processes but they are (apparently)
> > different.  When I run JBuilder on 1.2.2/green, I get one process.
> > When I run it on 1.3/native, I get 6.  You should see 'em breed like
> > rabbits when I run apps in the debugger...
>
>
> > I'd be curious to see if your other three threads really still have
> > root's euid after the 'fork' or if ps is just not updating some value
> > in its display properly.
> >
> > On the other hand... why can't you drop the euid in each thread after
> > the fork, and/or before the fork?  Surely it doesn't require root privs
> > to call fork()?  (Fork? In Java?  What are we talking about, anyway?)
> >
> > --
> > Joi Ellis                    Software Engineer
> > Aravox Technologies          [EMAIL PROTECTED], [EMAIL PROTECTED]
> >
> > No matter what we think of Linux versus FreeBSD, etc., the one thing I
> > really like about Linux is that it has Microsoft worried.  Anything
> > that kicks a monopoly in the pants has got to be good for something.
> >            - Chris Johnson
> >
> > ----------------------------------------------------------------------
> > To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to