Andrew Haley wrote:
> Gary Benson writes:
> > Hi all,
> > 
> > Each time you execute a file with Runtime.exec() a VMProcess
> > is created.  The first time one of these is created it creates
> > a thread and calls its setDaemon() method which (eventually)
> > checks RuntimePermission("modifyThread").
> > 
> > I guess there should be a doPrivileged() in here somewhere, but
> > where?
> 
> I guess I don't understand the real problem.  Would it not make
> sense simply to wrap the
> 
>       if (processThread == null)
>         {
>           processThread = new ProcessThread();
>           processThread.setDaemon(true);
>           processThread.start();
>         }
> 
> in a doPrivileged ?

That's where I was thinking.  Is there (or should there be) something
that protects these VM* classes from being used by non-Classpath code?

Cheers,
Gary

Reply via email to